Sha256: 0a81dab28550dcd3eaa0efab588a7880f10d7a5f7037106185c15bf385eb0304

Contents?: true

Size: 984 Bytes

Versions: 3

Compression:

Stored size: 984 Bytes

Contents

require 'devise'

module ActiveAdmin
  module Devise

    def self.config
      {
        :path => ActiveAdmin.default_namespace,
        :controllers => ActiveAdmin::Devise.controllers,
        :path_names => { :sign_in => 'login', :sign_out => "logout" }
      }
    end

    def self.controllers
      {
        :sessions => "active_admin/devise/sessions",
        :passwords => "active_admin/devise/passwords"
      }
    end

    module Controller
      extend ::ActiveSupport::Concern
      included do
        layout 'active_admin_logged_out'
        helper ::ActiveAdmin::ViewHelpers
      end

      # Redirect to the default namespace on logout
      def root_path
        "/#{ActiveAdmin.default_namespace}"
      end
    end

    class SessionsController < ::Devise::SessionsController
      include ::ActiveAdmin::Devise::Controller
    end

    class PasswordsController < ::Devise::PasswordsController
      include ::ActiveAdmin::Devise::Controller
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activeadmin-0.2.2 lib/active_admin/devise.rb
activeadmin-0.2.1 lib/active_admin/devise.rb
activeadmin-0.2.0 lib/active_admin/devise.rb