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