Sha256: 822dcfec7215634c82ba3970c4f730f011bd34ba88d8527ac4a8fc10748471af

Contents?: true

Size: 1.34 KB

Versions: 10

Compression:

Stored size: 1.34 KB

Contents

module PushType
  module Auth
    class Engine < ::Rails::Engine
      isolate_namespace PushType
      engine_name 'push_type_auth'

      config.generators do |g|
        g.assets false
        g.helper false
        g.test_framework  :minitest, spec: true, fixture: false
      end

      config.to_prepare do
        PushType::User.send :include, PushType::Authenticatable
        Devise::Mailer.layout 'push_type/email'
      end

      initializer 'push_type_auth.extend_controllers' do
        PushType::AdminController.send :include, PushType::AuthenticationMethods
        PushType::UsersController.send :include, PushType::InvitationMethods
      end

      initializer 'push_type_auth.extend_helpers' do
        DeviseController.helper PushType::AdminHelper
      end

      initializer 'push_type_auth.devise_config' do
        Devise.mailer_sender = PushType.config.mailer_sender
        Devise.router_name = :push_type
      end

      initializer 'push_type_auth.menus' do
        PushType.menu :utility do
          item :settings do
            text  { ficon(:widget) }
            link  { push_type.edit_profile_path }
          end
          item :sign_out do
            text  { ficon(:power) }
            link  { push_type.destroy_user_session_path }
            link_options method: 'delete'
          end
        end
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
push_type_auth-0.5.1 lib/push_type/auth/engine.rb
push_type_auth-0.5.0 lib/push_type/auth/engine.rb
push_type_auth-0.5.0.alpha.5 lib/push_type/auth/engine.rb
push_type_auth-0.5.0.alpha.4 lib/push_type/auth/engine.rb
push_type_auth-0.5.0.alpha.3 lib/push_type/auth/engine.rb
push_type_auth-0.5.0.alpha.2 lib/push_type/auth/engine.rb
push_type_auth-0.5.0.alpha.1 lib/push_type/auth/engine.rb
push_type_auth-0.4.0 lib/push_type/auth/engine.rb
push_type_auth-0.4.0.beta.3 lib/push_type/auth/engine.rb
push_type_auth-0.3.3 lib/push_type/auth/engine.rb