Saturday, October 29, 2011

[Rails] Route alias

You can execute "rake routes" to view display routes in your app.

The first column of output are route aliases which you can refer to in your app or test by append "_path" to that alias.

If you use resource in routes.rb, it will automatically generate CRUD routes and their alias for you.

But if you want to alias your other routes, you can do by append below after your routes
, :as => :{alias you want}
Note: Rails 3.1

No comments:

Useful commands for observe running JVM process

$ jcmd List running processes $ jinfo  Get details of a process $ jps -lvm List running processes with params