Created
December 10, 2012 16:38
-
-
Save tubbo/4251682 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ContractorsController < ApplicationController | |
| def search; end | |
| def import; end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ImportController < AdminController | |
| def trades | |
| if request.get? | |
| else request.post? | |
| end | |
| end | |
| def contractors | |
| if request.get? | |
| else request.post? | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LabelsController < ApplicationController | |
| def import; end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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