Added :via param (prepared for rails4).

This commit is contained in:
Martin Edenhofer 2013-05-27 09:27:00 +02:00
parent 1d03fcfc55
commit 78c14e622a
8 changed files with 18 additions and 18 deletions

View file

@ -1,8 +1,8 @@
module ExtraRoutes
def add(map)
map.match '/api/activity_stream', :to => 'activity#activity_stream'
map.match '/api/activity_stream', :to => 'activity#activity_stream', :via => :get
end
module_function :add
end
end

View file

@ -2,8 +2,8 @@ module ExtraRoutes
def add(map)
# getting_started
map.match '/api/getting_started', :to => 'getting_started#index'
map.match '/api/getting_started', :to => 'getting_started#index', :via => :get
end
module_function :add
end
end

View file

@ -2,9 +2,9 @@ module ExtraRoutes
def add(map)
# messages
map.match '/api/message_send', :to => 'long_polling#message_send'
map.match '/api/message_receive', :to => 'long_polling#message_receive'
map.match '/api/message_send', :to => 'long_polling#message_send', :via => [ :get, :post ]
map.match '/api/message_receive', :to => 'long_polling#message_receive', :via => [ :get, :post ]
end
module_function :add
end
end

View file

@ -6,7 +6,7 @@ module ExtraRoutes
map.match '/api/organizations/:id', :to => 'organizations#show', :via => :get
map.match '/api/organizations', :to => 'organizations#create', :via => :post
map.match '/api/organizations/:id', :to => 'organizations#update', :via => :put
end
module_function :add
end
end

View file

@ -1,8 +1,8 @@
module ExtraRoutes
def add(map)
map.match '/api/recent_viewed', :to => 'recent_viewed#recent_viewed'
map.match '/api/recent_viewed', :to => 'recent_viewed#recent_viewed', :via => :get
end
module_function :add
end
end

View file

@ -2,8 +2,8 @@ module ExtraRoutes
def add(map)
# rss
map.match '/api/rss_fetch', :to => 'rss#fetch'
map.match '/api/rss_fetch', :to => 'rss#fetch', :via => :get
end
module_function :add
end
end

View file

@ -1,9 +1,9 @@
module ExtraRoutes
def add(map)
map.match '/test', :to => 'tests#index'
map.match '/test/wait/:sec', :to => 'tests#wait'
map.match '/test', :to => 'tests#index', :via => :get
map.match '/test/wait/:sec', :to => 'tests#wait', :via => :get
end
module_function :add
end
end

View file

@ -1,7 +1,7 @@
module ExtraRoutes
def add(map)
map.resources :translations
map.match '/translations/lang/:locale', :to => 'translations#load'
map.match '/translations/lang/:locale', :to => 'translations#load', :via => :get
end
module_function :add
end
end