From 78c14e622aa4edf7bce48b789da63970093303e0 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 27 May 2013 09:27:00 +0200 Subject: [PATCH] Added :via param (prepared for rails4). --- config/routes/activity_stream.rb | 4 ++-- config/routes/getting_started.rb | 4 ++-- config/routes/message.rb | 6 +++--- config/routes/organization.rb | 4 ++-- config/routes/recent_viewed.rb | 4 ++-- config/routes/rss.rb | 4 ++-- config/routes/test.rb | 6 +++--- config/routes/translation.rb | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/config/routes/activity_stream.rb b/config/routes/activity_stream.rb index 3c7061d15..19a4c8125 100644 --- a/config/routes/activity_stream.rb +++ b/config/routes/activity_stream.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes/getting_started.rb b/config/routes/getting_started.rb index fa76896f1..91e14a5bd 100644 --- a/config/routes/getting_started.rb +++ b/config/routes/getting_started.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes/message.rb b/config/routes/message.rb index 11b3010fc..81c2da930 100644 --- a/config/routes/message.rb +++ b/config/routes/message.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes/organization.rb b/config/routes/organization.rb index 9bc18b988..08317dd95 100644 --- a/config/routes/organization.rb +++ b/config/routes/organization.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes/recent_viewed.rb b/config/routes/recent_viewed.rb index d3cc4dc03..d21baafb8 100644 --- a/config/routes/recent_viewed.rb +++ b/config/routes/recent_viewed.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes/rss.rb b/config/routes/rss.rb index 178d648fa..689e52964 100644 --- a/config/routes/rss.rb +++ b/config/routes/rss.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes/test.rb b/config/routes/test.rb index 19af181b9..0f8832eec 100644 --- a/config/routes/test.rb +++ b/config/routes/test.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes/translation.rb b/config/routes/translation.rb index 2e6d23562..7b036d877 100644 --- a/config/routes/translation.rb +++ b/config/routes/translation.rb @@ -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 \ No newline at end of file +end