Hi,
I would like to change the default routing system.
I have a city model and instead of have :model/:controller/:id I would
like to change it to :model/:controller/:name.
How do I do this in the routes.rb?
I have this message “Couldn’t find City without an ID”
If you changed your default route to :model/:controller/:name then
there’s no place to pass an ID parameter to your controller, hence the
error message. Best practice would be to map.resources (if you are
using RESTful controllers, which is also good practice).
Matt
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.