Forum: Ruby on Rails Multiple scope routes

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.
3f52fe29df00360ea265a5560058739a?d=identicon&s=25 Rick Cockerham (pixie)
on 2013-08-21 16:01
Here's an interesting question that I'm not sure has an answer.  I would
like a controller to be accessed by multiple URL's within Rails.

example.com/crm/users/1
example.com/admin/users/1

They should both show the same page.

This works, but is an anti-DRY solution:
  scope "/crm" do
     resources :users
  end
  scope "/admin" do
     resources :users
  end

The solution I'm thinking of is to rewrite using Apache.  But, first I'd
like to know if I can do this within the routes because I have many
apache configs, but just one route file.

Thanks,
Rick
This topic is locked and can not be replied to.