]> git.openstreetmap.org Git - rails.git/commitdiff
Making the capabilities api version indipendent
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 20 Oct 2008 20:40:06 +0000 (20:40 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 20 Oct 2008 20:40:06 +0000 (20:40 +0000)
config/routes.rb

index 5b2ca38b9fd5107b2e19b4045093d41e1094c108..e49cdf74e7d80acc64aa07a8b5d14d5bc29b1c28 100644 (file)
@@ -1,6 +1,8 @@
 ActionController::Routing::Routes.draw do |map|
 
   # API
+  map.connect "api/capabilities", :controller => 'api', :action => 'capabilities'
+  
   map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create'
   map.connect "api/#{API_VERSION}/changeset/upload", :controller => 'changeset', :action => 'upload'
   map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/
@@ -25,9 +27,6 @@ ActionController::Routing::Routes.draw do |map|
   map.connect "api/#{API_VERSION}/way/:id", :controller => 'way', :action => 'delete', :id => /\d+/, :conditions => { :method => :delete }
   map.connect "api/#{API_VERSION}/ways", :controller => 'way', :action => 'ways', :id => nil
 
-  # FIXME Wouldn't capabilites be better placed somewhere else in this file
-  # and without the #{API_VERSION}, so that clients can always find it?
-  map.connect "api/#{API_VERSION}/capabilities", :controller => 'api', :action => 'capabilities'
   map.connect "api/#{API_VERSION}/relation/create", :controller => 'relation', :action => 'create'
   map.connect "api/#{API_VERSION}/relation/:id/relations", :controller => 'relation', :action => 'relations_for_relation', :id => /\d+/
   map.connect "api/#{API_VERSION}/relation/:id/history", :controller => 'old_relation', :action => 'history', :id => /\d+/