By question is actually pretty simple. I'd just like to know if anybody was able to load their Rails 3 routes into a database so that they could be manipulated without server access from an admin panel like Typus. If anyone has pulled this off or knows of an effective way to do it, please let me know as I am really curious to pull this off on Rails 3.
Rails RESTful Design which creates seven routes all mapping to the user controller. Rails also allows you to define multiple resources in one line.
In Rails, the routes of your application live in config/routes. rb . The Rails router recognises URLs and dispatches them to a controller's action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views.
Considering the same case, the two terms can be differentiated in a simple way as :member is used when a route has a unique field :id or :slug and :collection is used when there is no unique field required in the route.
Resource routing allows you to quickly declare all of the common routes for a given resourceful controller. A single call to resources can declare all of the necessary routes for your index , show , new , edit , create , update , and destroy actions.
You may have to handle your own dispatching with a route like "*path"
. Then /foo/bar/123
would route to a controller of your choice where params[:path]
is an array ['foo', 'bar', '123']
. Then you could do whatever from there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With