Module: Corzinus::Controllable

Extended by:
ActiveSupport::Concern
Includes:
Flashable
Included in:
ApplicationController
Defined in:
app/controllers/concerns/corzinus/controllable.rb

Instance Method Summary collapse

Methods included from Flashable

#flash_render

Instance Method Details

#authenticate_corzinus_person!Object



11
12
13
14
# File 'app/controllers/concerns/corzinus/controllable.rb', line 11

def authenticate_corzinus_person!
  auth_method = "authenticate_#{Corzinus.person_class.underscore}!"
  send(auth_method) if respond_to?(auth_method)
end

#current_orderObject



21
22
23
# File 'app/controllers/concerns/corzinus/controllable.rb', line 21

def current_order
  @current_order ||= set_current_order
end

#current_personObject



16
17
18
19
# File 'app/controllers/concerns/corzinus/controllable.rb', line 16

def current_person
  resource_method = "current_#{Corzinus.person_class.underscore}"
  send(resource_method) if respond_to?(resource_method)
end