trabajo-afectivo/config/routes/template.rb

13 lines
563 B
Ruby
Raw Normal View History

module ExtraRoutes
def add(map, api_path)
# templates
map.match api_path + '/templates', :to => 'templates#index', :via => :get
map.match api_path + '/templates/:id', :to => 'templates#show', :via => :get
map.match api_path + '/templates', :to => 'templates#create', :via => :post
map.match api_path + '/templates/:id', :to => 'templates#update', :via => :put
map.match api_path + '/templates/:id', :to => 'templates#destroy', :via => :delete
end
module_function :add
end