i have some trouble generating a route with rails 3.
here is what i got
a controller with a show method:
def show
@content = Content.find_by_slug!(params[:id])
end
i have a field in my db called :slug, which allows me to call http://www.mysite.com/controller/slug
what i want to do is create a route which allows me to render the same show method but
with http://www.mysite.com/slug
does somebody know how to do this?
any help would be appreciated, as everything else is working fine.
thanks in advance
chris
Add this towards the end of your your
routes.rbfile.and do this in your controller