Rails is able to dynamically build methods from magic names like
edit_record_path.
This is very powerful, but how to find docs about it?
Rails is able to dynamically build methods from magic names like
edit_record_path.
This is very powerful, but how to find docs about it?
Fritz T. wrote:
Rails is able to dynamically build methods from magic names like
edit_record_path.This is very powerful, but how to find docs about it?
If you just want to see what routes you have defined.
$ rake routes
Robert W. wrote:
If you just want to see what routes you have defined.
No, I want to know, which parameters and options are acceptet.
Fritz T. wrote:
Robert W. wrote:
If you just want to see what routes you have defined.
No, I want to know, which parameters and options are acceptet.
Did you read that guide I linked? It should tell you all you need to
know about using the routing helpers.
Fritz T. wrote:
Robert W. wrote:
If you just want to see what routes you have defined.
No, I want to know, which parameters and options are acceptet.
The link that Robert posted explains your question exactly. A tiny
part of that page:
3.3 URLs and Paths
Creating a RESTful route will also make available a pile of helpers
within your application:
photos_url and photos_path map to the path for the index and create
actions
new_photo_url and new_photo_path map to the path for the new action
edit_photo_url and edit_photo_path map to the path for the edit action
photo_url and photo_path map to the path for the show, update, and
destroy actions
Robert W. wrote:
No, I want to know, which parameters and options are acceptet.
Did you read that guide I linked? It should tell you all you need to
know about using the routing helpers.
Ok, it’s a part of the routing system. I expected to find some magic
meta programming method to be found in the docs.
Routing is an issue, I spent a lot of time with, without getting a real
overview until now.
Thanks for your help.
Yes, I agreed with him. This link fulfills your query with certain dignity and presence.
Thanks.
Bennett Silas
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs