Sha256: 4b483ac1b8921a63a4e31f6ffeecd4d2b25543d96fa63f787c549de51b4086bc

Contents?: true

Size: 565 Bytes

Versions: 16

Compression:

Stored size: 565 Bytes

Contents

module Avo
  module InitializesAvo
    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

    def _current_user
      instance_eval(&Avo.configuration.current_user)
    end

    def context
      instance_eval(&Avo.configuration.context)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
avo-3.15.1 app/controllers/concerns/avo/initializes_avo.rb
avo-3.15.0 app/controllers/concerns/avo/initializes_avo.rb
avo-3.14.5 app/controllers/concerns/avo/initializes_avo.rb
avo-3.14.4 app/controllers/concerns/avo/initializes_avo.rb
avo-3.14.3 app/controllers/concerns/avo/initializes_avo.rb
avo-3.14.2 app/controllers/concerns/avo/initializes_avo.rb
avo-3.14.1 app/controllers/concerns/avo/initializes_avo.rb
avo-3.14.0 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.7 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.6 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.5 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.4 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.3 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.2 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.1 app/controllers/concerns/avo/initializes_avo.rb
avo-3.13.0 app/controllers/concerns/avo/initializes_avo.rb