Using: FluffyCode/reddit2 or a fork of it.
Replace the resources :posts
declaration in config/routes.rb
with an expanded version specifying each route.
When finished, run rake routes
and compare it the gist file rake_routes_output.txt
Afterwards create a file routes_quiz_answers.txt and give the answers to the following questions.
- What action is called when a
GET
request to/posts
occurs? - What helper should I use if I want to create a relative link to the
posts#new
action? - If I have my rails server on port 3000 and I go to
localhost:3000/posts/4
in my browser, what is the HTTP verb? What Rails action will be called?
The Ruby on Rails Guides will be helpful. Particularly this one on routes.
Fork this gist and add two files routes_quiz_answers.txt
and my_rake_routes_output.txt
. Then post a comment to this gist linking to yours in order to get graded.
This assignment is licensed under the Creative Commons Share-Alike, Non-Commercial, Attribution (CC-BY-NC-SA) and I'd really like to hear from you if you use it.
Expanded routes:
https://github.com/FluffyCode/reddit2/blob/master/config/routes.rb
Quiz:
https://github.com/FluffyCode/reddit2/blob/master/routes_quiz_answers.rb
http://images.icanhascheezburger.com/completestore/2008/8/9/canihazcook128628124022230057.jpg