jeudi 25 juin 2015

Ruby on Rails resource routes, use slug instead of id

So i'm looking for a solution that would help me achieve the following with rails resource:

'/admin/articles/:slug/edit'

as opposed to

'/admin/articles/:id/edit'

I'm looking for rails resource routes and not the other kinds of routes.(http://ift.tt/1zOqALl)

Just wanted to know if it was possible. If so, how?

Thanks a bunch in advance

Aucun commentaire:

Enregistrer un commentaire