Skip to content

Overuse route customizations

Richard Huang edited this page Aug 15, 2010 · 3 revisions

Please go to: http://rails-bestpractices.com/posts/10-overuse-route-customizations

Before:


map.resources :posts, :member => { :comments => :get,
                                   :create_comment => :post,
                                   :update_comment => :put,
                                   :delete_comment => :delete }

After:


map.resources :posts do |post|
  post.resources :comments
end