Module: Avo::InitializesAvo
- Included in:
- BaseApplicationController
- Defined in:
- app/controllers/concerns/avo/initializes_avo.rb
Instance Method Summary collapse
Instance Method Details
#_current_user ⇒ Object
13 14 15 |
# File 'app/controllers/concerns/avo/initializes_avo.rb', line 13 def _current_user instance_eval(&Avo.configuration.current_user) end |
#context ⇒ Object
17 18 19 |
# File 'app/controllers/concerns/avo/initializes_avo.rb', line 17 def context instance_eval(&Avo.configuration.context) end |
#init_app ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/controllers/concerns/avo/initializes_avo.rb', line 3 def init_app Avo::Current.license = Avo::Licensing::NilLicense.new Avo::Current.context = context Avo::Current.user = _current_user Avo::Current.view_context = view_context Avo.init Avo::Current.license = Licensing::LicenseManager.new(Licensing::HQ.new(request).response).license Avo::Current.locale = locale end |