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:

[PostgreSQL] How to create read-only standby replica (follower)

This link  and this link explain it really well and concise