I have a model Model that can be access from many ways: by subdomain or a token
I have the following routes
resources :model, :constraints => {:model_id => /[a-zA-Z0-9]{4}/} do
... (nested resources...)
end
resources :model, :constraints => {:subdomain => /.+/} do
... (same as above: nested resources...)
end
So I currently have to duplicate all the routes for the two cases.
Is there any way to declare it only once?