2012-09-20 12:08:02 +00:00
|
|
|
module ExtraRoutes
|
2013-08-06 22:10:28 +00:00
|
|
|
def add(map, api_path)
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
# base objects
|
2013-08-06 22:10:28 +00:00
|
|
|
map.match api_path + '/settings', :to => 'settings#index', :via => :get
|
|
|
|
map.match api_path + '/settings/:id', :to => 'settings#show', :via => :get
|
|
|
|
map.match api_path + '/settings', :to => 'settings#create', :via => :post
|
|
|
|
map.match api_path + '/settings/:id', :to => 'settings#update', :via => :put
|
|
|
|
map.match api_path + '/settings/:id', :to => 'settings#destroy', :via => :delete
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
module_function :add
|
|
|
|
end
|