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
|
|
|
|
|
|
|
# roles
|
2013-08-06 22:10:28 +00:00
|
|
|
map.match api_path + '/roles', :to => 'roles#index', :via => :get
|
|
|
|
map.match api_path + '/roles/:id', :to => 'roles#show', :via => :get
|
|
|
|
map.match api_path + '/roles', :to => 'roles#create', :via => :post
|
|
|
|
map.match api_path + '/roles/:id', :to => 'roles#update', :via => :put
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
module_function :add
|
|
|
|
end
|