I'm trying to make a named route 'have_many' other named routes here. But the way I'm doing it's not working.
Here is my problem: I've several game platforms that I want to access by /:platform_name/. This is working:
map.platform ':platform_name',
:controller => :platforms,
:action => :index,
:platform_name => /pc|ps2|ps3|wii|ds|psp|xbox360/
But I also have games inside each platform, that I want to refer by name, so I've tried:
map.platform ':platform_name',
:controller => :platforms,
:action => :index,
:platform_name => /pc|ps2|ps3|wii|ds|psp|xbox360/ do |platform|
platform.games ':game_name',
:controller => :games
end
But when I do this, even the platform route stop working. Is it possible to have a named route inside other named route? I can only imagine a dirty code to achieve this without the has_many relation. Any idea is welcome :)