Step 1 of 6 | Menu

Resourceful routing with Rails

blog.jamesalmond.com

2a3e335f3d961e93

Resource routing in Rails is most often used for nesting related ActiveRecord objects, such as a post having many comments: The resource method of the router hooks up the "RESTful" urls with a set of standard set of controller methods and HTTP verb: post_comments GET /posts/:post_id/comments(.:format) {:action=>"index", :controller=>"comments"} POST /posts/:post_id/comments(.:format)

Visit Jamesalmond

0 comments

Log in or Sign up to comment