Sha256: 6efd0bcc2b8c373c9a6f95589119e005c36c256ac6e623d820ed674d074a12e3

Contents?: true

Size: 462 Bytes

Versions: 7

Compression:

Stored size: 462 Bytes

Contents

module Admin
  class DeviseOverrides::SessionsController < Devise::SessionsController
    layout 'admin'
    before_filter :update_return_to, only: %w(new)

    def after_sign_in_path_for(resource)
      "#{admin_path}##{stored_location_for(resource)}"
    end

    def after_sign_out_path_for(resource)
      new_admin_user_session_path
    end

    private

    def update_return_to
      session["admin_user_return_to"] = params[:return_to]
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
venice-chr-0.1.5 app/controllers/admin/devise_overrides/sessions_controller.rb
venice-chr-0.1.4 app/controllers/admin/devise_overrides/sessions_controller.rb
chr-0.5.7 templates/devise_overrides_sessions_controller.rb
venice-chr-0.1.3 app/controllers/admin/devise_overrides/sessions_controller.rb
venice-chr-0.1.2 app/controllers/admin/devise_overrides/sessions_controller.rb
venice-chr-0.1.1 app/controllers/admin/devise_overrides/sessions_controller.rb
chr-0.5.6 templates/devise_overrides_sessions_controller.rb