Rails 3 Notes

From Rory.wiki

Jump to: navigation, search

Security

In application.rb there's a parameter config.filter_parameters which is an array containing paramters which shouldn't be logged. By default the only element getting added to it in this file is :password. Wonder if other fields like :confirm_password get logged then?


Setting the home page

Modify config/routes.rb add a line root :to => "<modelnameplurak>#index" . eg if you want the root page a model called posts root :to => "posts#index" . Also remove the index.html file from /public.

HABTM Collection Select

If you've got a many to many relationship

collection select example

Personal tools