Sha256: 99de079d8baa5e5f41e30e881b38eb9db23320f02a3165d368dcf603366b8b1a

Contents?: true

Size: 510 Bytes

Versions: 7

Compression:

Stored size: 510 Bytes

Contents

module Avatax
  class EngineController < ApplicationController

    layout :get_layout

    def get_layout
      layout ||= Avatax.config[:layout]
    end

    def current_tenant_user
      # If the rails application on which that engine is mounted defines such method (Devise), we extract the current user,
      # if not we default to nil, and serve our static mock configuration
      user = current_user if respond_to?(:current_user)
      Avatax.current_tenant_user.call(session, user)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
killbill-avatax-2.0.0 app/controllers/avatax/engine_controller.rb
killbill-avatax-1.0.0 app/controllers/avatax/engine_controller.rb
killbill-avatax-0.2.0 app/controllers/avatax/engine_controller.rb
killbill-avatax-0.1.0 app/controllers/avatax/engine_controller.rb
killbill-avatax-0.0.3 app/controllers/avatax/engine_controller.rb
killbill-avatax-0.0.2 app/controllers/avatax/engine_controller.rb
killbill-avatax-0.0.1 app/controllers/avatax/engine_controller.rb