Module: SpreeWholesale::WholesalerController

Included in:
Admin::WholesalersController, WholesalersController
Defined in:
lib/spree_wholesale/wholesaler_controller.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/spree_wholesale/wholesaler_controller.rb', line 5

def self.included(mod)
  mod.instance_eval do
    resource_controller
    before_filter :use_billing?, :only => [ :create, :update ] 
    before_filter :setup_defaults, :only => [:new,:create,:edit,:update]
    
    index.before :new_wholesale_user
    
    helper_method :wholesale_role
    
  end
  mod.send(:include, ClassMethods)
end