ruby on rails - How to set routes.rb for ONLY controller and view object? -


I have a controller called store_controler, and the view for the store. But the store does not have a model, but I want to use store_path in code. If you are only a store (without id), then how can I add Store_path to the routes. RB?

store so you can edit the store_path ):

  map.resource: store ,: only = & gt; [: Show]  

You can also create a custom path:

  map.store "/ store" ,: admin = & gt; "Store",: Action => "Show"  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -