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.
Just wanted to know if it was possible. If so, how?
# config/routes.rb
resources :articles, param: :slug
In the terminal:
$ rake routes
...
article GET /articles/:slug(.:format) articles#show
...
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