I’m trying to create a url that looks like this:
www.example.com/something/:a_slug
So a url that is /something where something is not a controller (but it is mapped to a controller, like a controller alias). Something is a fixed word.
Then :a_slug can be any slug passed into the a controller and picked up on an action.
Sort of a very custom show resource url.
It seems simple but I can’t seem to get the route right.
Cheers!
routes.rb
app/controllers/widgets_controller.rb
And as if by magic,
GET /something/fehshowsfehin the browser.Oh, of course this is for rails 3. It’s similar for rails 2 but you didn’t specify a requirement there.