trabajo-afectivo/config/routes/translation.rb

13 lines
676 B
Ruby
Raw Normal View History

module ExtraRoutes
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
end
module_function :add
end