0

This site is the only authoritative documentation on routes.rb from rubyonrails.org that I could find:

http://api.rubyonrails.org/classes/ActionDispatch/Routing.html

But this is just a guide—it doesn't methodically list each valid method along with valid arguments. On top of this, there are huge gaps, like the behaviour of get 'controller/action' without a third argument never once being addressed.

This kind of style is more what I was looking for. Notice how every method is listed and described in order and with uniform formatting. Is there anything like this for the syntax of RoR's routes.rb file?

This Q&A asks my question, but also asks a separate question. Only the separate question is answered, leaving my question unanswered—hence the creation of this new Q&A specifically about the documentation issue.

Community
  • 1
  • 1
enigmaticPhysicist
  • 1,518
  • 16
  • 21

1 Answers1

2

I agree the Rails routing documentation is very poor. Which is a shame because it's probably the most important topic. Less of documentation but, the most comprehensive guide is this one: http://guides.rubyonrails.org/routing.html.

The official module documentation is here: http://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper.html, but it's broken into the specific modules responsible for routing. Each has examples.

Finally, you may find this cheatsheet the most helpful: http://ricostacruz.com/cheatsheets/rails-routes.html.

Anthony E
  • 11,072
  • 2
  • 24
  • 44