Skip to content

Instantly share code, notes, and snippets.

@tubbo
Created December 10, 2012 16:38
Show Gist options
  • Select an option

  • Save tubbo/4251682 to your computer and use it in GitHub Desktop.

Select an option

Save tubbo/4251682 to your computer and use it in GitHub Desktop.
class ContractorsController < ApplicationController
def search; end
def import; end
end
class ImportController < AdminController
def trades
if request.get?
else request.post?
end
end
def contractors
if request.get?
else request.post?
end
end
end
class LabelsController < ApplicationController
def import; end
end
Portal::Application.routes.draw do
resources :trades do
collection do
post 'import'
end
end
resources :contractors do
collection do
post 'import'
get 'search'
end
end
post "/admin/import/labels" => 'labels#import'
post "/admin/import/contractors" => 'contractors#import'
root to: 'main#index'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment