if you really up to rest, you should be ok with urls like this
/platforms/xbox360/games/halo-3
or, more practical
/platforms/10-xbox360/games/2-halo-3
where 10, 2 - record id’s
you’ll need to have
map.resources :platforms { |platform| platform.resources :games }
among your routes and tweak your Platform and Game to_param method to
return platform and game title instead of id (you will have to keep
titles unique, tho) or id, followed by title, which is preferred
Legacy, I understand
In my opinion, it looks shorter, but not more readable.
However, it’s only up to how to lay out your uris, rest is not panacea
and all map.resources is in fact doing is creating a set of named
routes automatically for you.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.