Added :via param (prepared for rails4).
This commit is contained in:
parent
1d03fcfc55
commit
78c14e622a
8 changed files with 18 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
||||||
module ExtraRoutes
|
module ExtraRoutes
|
||||||
def add(map)
|
def add(map)
|
||||||
|
|
||||||
map.match '/api/activity_stream', :to => 'activity#activity_stream'
|
map.match '/api/activity_stream', :to => 'activity#activity_stream', :via => :get
|
||||||
|
|
||||||
end
|
end
|
||||||
module_function :add
|
module_function :add
|
||||||
|
|
|
@ -2,7 +2,7 @@ module ExtraRoutes
|
||||||
def add(map)
|
def add(map)
|
||||||
|
|
||||||
# getting_started
|
# getting_started
|
||||||
map.match '/api/getting_started', :to => 'getting_started#index'
|
map.match '/api/getting_started', :to => 'getting_started#index', :via => :get
|
||||||
|
|
||||||
end
|
end
|
||||||
module_function :add
|
module_function :add
|
||||||
|
|
|
@ -2,8 +2,8 @@ module ExtraRoutes
|
||||||
def add(map)
|
def add(map)
|
||||||
|
|
||||||
# messages
|
# messages
|
||||||
map.match '/api/message_send', :to => 'long_polling#message_send'
|
map.match '/api/message_send', :to => 'long_polling#message_send', :via => [ :get, :post ]
|
||||||
map.match '/api/message_receive', :to => 'long_polling#message_receive'
|
map.match '/api/message_receive', :to => 'long_polling#message_receive', :via => [ :get, :post ]
|
||||||
|
|
||||||
end
|
end
|
||||||
module_function :add
|
module_function :add
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module ExtraRoutes
|
module ExtraRoutes
|
||||||
def add(map)
|
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
|
end
|
||||||
module_function :add
|
module_function :add
|
||||||
|
|
|
@ -2,7 +2,7 @@ module ExtraRoutes
|
||||||
def add(map)
|
def add(map)
|
||||||
|
|
||||||
# rss
|
# rss
|
||||||
map.match '/api/rss_fetch', :to => 'rss#fetch'
|
map.match '/api/rss_fetch', :to => 'rss#fetch', :via => :get
|
||||||
|
|
||||||
end
|
end
|
||||||
module_function :add
|
module_function :add
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
module ExtraRoutes
|
module ExtraRoutes
|
||||||
def add(map)
|
def add(map)
|
||||||
|
|
||||||
map.match '/test', :to => 'tests#index'
|
map.match '/test', :to => 'tests#index', :via => :get
|
||||||
map.match '/test/wait/:sec', :to => 'tests#wait'
|
map.match '/test/wait/:sec', :to => 'tests#wait', :via => :get
|
||||||
|
|
||||||
end
|
end
|
||||||
module_function :add
|
module_function :add
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module ExtraRoutes
|
module ExtraRoutes
|
||||||
def add(map)
|
def add(map)
|
||||||
map.resources :translations
|
map.resources :translations
|
||||||
map.match '/translations/lang/:locale', :to => 'translations#load'
|
map.match '/translations/lang/:locale', :to => 'translations#load', :via => :get
|
||||||
end
|
end
|
||||||
module_function :add
|
module_function :add
|
||||||
end
|
end
|
Loading…
Reference in a new issue