Sha256: 2e2308c04ab7e3b4289ed69f6a6661e71418c7006df900c3e766c8d177efa010

Contents?: true

Size: 614 Bytes

Versions: 12

Compression:

Stored size: 614 Bytes

Contents

module Kaui
  # Subclassed to specify the correct layout
  class SessionsController < Devise::SessionsController
    layout Kaui.config[:layout]

    skip_before_filter :check_for_redirect_to_tenant_screen

    protected

    # Override after_sign_in_path_for to not have to rely on the default 'root' config which we want to keep on home#index
    def after_sign_in_path_for(resource)
      # Clear the tenant_id from the cookie to not rely on old cookie data
      session[:kb_tenant_id] = nil
      Kaui.tenant_home_path.call
    end

    def after_sign_out_path_for(resource)
      kaui_path
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kaui-0.15.5 app/controllers/kaui/sessions_controller.rb
kaui-0.15.4 app/controllers/kaui/sessions_controller.rb
kaui-0.15.3 app/controllers/kaui/sessions_controller.rb
kaui-0.15.2 app/controllers/kaui/sessions_controller.rb
kaui-0.15.1 app/controllers/kaui/sessions_controller.rb
kaui-0.15.0 app/controllers/kaui/sessions_controller.rb
kaui-0.14.2 app/controllers/kaui/sessions_controller.rb
kaui-0.14.1 app/controllers/kaui/sessions_controller.rb
kaui-0.14.0 app/controllers/kaui/sessions_controller.rb
kaui-0.12.0 app/controllers/kaui/sessions_controller.rb
kaui-0.11.0 app/controllers/kaui/sessions_controller.rb
kaui-0.10.0 app/controllers/kaui/sessions_controller.rb