Forum: Ruby on Rails Multiple actions for one route (making pretty URLs hit diffe

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
143d37bc67b04ad4fdc69beddda48651?d=identicon&s=25 Tom Taylor (Guest)
on 2006-03-06 15:16
(Received via mailing list)
Hi all,

I'm trying to make pretty URLs using routes for some of my actions
across different controllers. For example:

http://www.example.com/london ->
http://www.example.com/articles/show_by_name/london

But if the id 'about' couldn't be found, then to search for it as
another action, this time from the 'branch' controller.

http://www.example.com/london ->
http://www.example.com/branches/show_by_name/london

And so on, checking through different actions in different controllers,
until it finds something that matches.

How can I achieve this, preferably without building a specific
controller/action to handle and forward requests to the appropriate
pages?

Thanks a lot!

Tom
This topic is locked and can not be replied to.