2012-05-18 13:54:48 +00:00
|
|
|
module ExtraRoutes
|
2013-08-06 22:10:28 +00:00
|
|
|
def add(map, api_path)
|
|
|
|
map.match api_path + '/translations', :to => 'translations#index', :via => :get
|
|
|
|
map.match api_path + '/translations/:id', :to => 'translations#show', :via => :get
|
|
|
|
map.match api_path + '/translations', :to => 'translations#create', :via => :post
|
|
|
|
map.match api_path + '/translations/:id', :to => 'translations#update', :via => :put
|
|
|
|
map.match api_path + '/translations/:id', :to => 'translations#destroy', :via => :delete
|
|
|
|
|
|
|
|
map.match api_path + '/translations/lang/:locale', :to => 'translations#load', :via => :get
|
2012-05-18 13:54:48 +00:00
|
|
|
end
|
|
|
|
module_function :add
|
2013-05-27 07:27:00 +00:00
|
|
|
end
|