We're migrating a site from a proprietary framework to Ruby on Rails (v2.3). The current framework sometimes puts /base/ at the start of the URL for no discernible reason, and I'd like the existing URL to work, even though we won't give it out any more.
My current solution, which I don't like, is to define the routes once on the main map and once on a 'base' scope:
def draw_routes(map)
# do my routing here
end
ActionController::Routing::Routes.draw do |map|
map.with_options :path_prefix => '/base' do |base|
draw_map(base)
end
draw_map(map)
end
what I'd like to do is something like:
ActionController::Routing::Routes.draw do |map|
map.strip 'base'
# do my routing here
end
is there a solution of that form?