I have a model Model, which can be accessed from different ways: subdomain or 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
Therefore, I have to duplicate all the routes for two cases.
Is it possible to declare it only once?
source share