I created model objects of from generating a scaffold, but now I want to instead of linking to
/:controller/:id (/objectname/1) to /:controller/:title (/objectname/new_blog_post). How do I do this so that links will correct link to the title and not id?
I want to go from:
/:controller/:id
to
/:controller/:name
Use to param
Or look into a plugin, acts_as_sluggable and friendly_id are ones I know of.
EDIT: Oh yes and as mentioned make sure whatever you use is unique.
EDIT:
it would work like:
In view:
And if the that users name is John then it will render /users/John after you click that link