Revision 63b050e7
Added by Ivan Necas over 11 years ago
- ID 63b050e7da2fd8d14238c3d468aad183cc924aaf
config/routes/api/v2.rb | ||
---|---|---|
resources :usergroups, :except => [:new, :edit]
|
||
resources :users, :except => [:new, :edit]
|
||
resources :template_kinds, :only => [:index]
|
||
|
||
match '/', :to => 'home#index'
|
||
match 'status', :to => 'home#status', :as => "status"
|
||
end
|
||
|
||
# new v2 routes that point to v2
|
||
... | ... | |
resources :template_combinations, :only => [:index, :create]
|
||
end
|
||
resources :template_combinations, :only => [:show, :destroy]
|
||
|
||
|
||
match '/', :to => 'home#index'
|
||
match 'status', :to => 'home#status', :as => "status"
|
||
match '*other', :to => 'home#route_error'
|
||
|
||
end
|
||
|
||
match '*other', :to => 'v1/home#route_error', :constraints => ApiConstraints.new(:version => 2)
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
Fix home mapping in API v2
Home controller is in v1, mapping all the routes from scope for v1
except the final fallback, that needs to go to the end of routes file.
Oterwise status is not working for V2.