Sha256: ca19f351678696e20b1f273bc15bc97af9377713a0c3886107a3ee474ac4cff3

Contents?: true

Size: 889 Bytes

Versions: 15

Compression:

Stored size: 889 Bytes

Contents

module EffectiveRoles
  class Engine < ::Rails::Engine
    engine_name 'effective_roles'

    config.autoload_paths += Dir["#{config.root}/app/models/concerns"]

    # Include Helpers to base application
    initializer 'effective_roles.action_controller' do |app|
      ActiveSupport.on_load :action_controller do
        helper EffectiveRolesHelper
      end
    end

    # Include acts_as_addressable concern and allow any ActiveRecord object to call it
    initializer 'effective_roles.active_record' do |app|
      ActiveSupport.on_load :active_record do
        ActiveRecord::Base.extend(ActsAsRoleRestricted::ActiveRecord)
      end
    end

    # Set up our default configuration options.
    initializer "effective_roles.defaults", :before => :load_config_initializers do |app|
      eval File.read("#{config.root}/lib/generators/templates/effective_roles.rb")
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
effective_roles-1.3.7 lib/effective_roles/engine.rb
effective_roles-1.3.6 lib/effective_roles/engine.rb
effective_roles-1.3.5 lib/effective_roles/engine.rb
effective_roles-1.3.4 lib/effective_roles/engine.rb
effective_roles-1.3.3 lib/effective_roles/engine.rb
effective_roles-1.3.2 lib/effective_roles/engine.rb
effective_roles-1.3.1 lib/effective_roles/engine.rb
effective_roles-1.3.0 lib/effective_roles/engine.rb
effective_roles-1.2.1 lib/effective_roles/engine.rb
effective_roles-1.2.0 lib/effective_roles/engine.rb
effective_roles-1.1.0 lib/effective_roles/engine.rb
effective_roles-1.0.2 lib/effective_roles/engine.rb
effective_roles-1.0.1 lib/effective_roles/engine.rb
effective_roles-1.0.0 lib/effective_roles/engine.rb
effective_roles-0.1 lib/effective_roles/engine.rb