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
Post a Comment