Sha256: 3ced77b5afc7bb34f9d9c36142265049310c18fda1a17fc7982d192b9071173e

Contents?: true

Size: 530 Bytes

Versions: 10

Compression:

Stored size: 530 Bytes

Contents

module RoleAuthorization
  class Railtie < Rails::Engine
    initializer "role_authorization.initialize" do |app|
      RoleAuthorization.load_rules
      ::ActiveRecord::Base.send :extend, RoleAuthorization::ActiveRecord if defined?(::ActiveRecord)
    end

    # runs before every request in development
    # and once in production before serving requests
    # http://www.engineyard.com/blog/2010/extending-rails-3-with-railties
    config.to_prepare do
      RoleAuthorization::Roles.manager.try(:persist!)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
role_authorization-0.9.6 lib/rails/role_authorization.rb
role_authorization-0.9.5 lib/rails/role_authorization.rb
role_authorization-0.9.4 lib/rails/role_authorization.rb
role_authorization-0.9.3 lib/rails/role_authorization.rb
role_authorization-0.9.2 lib/rails/role_authorization.rb
role_authorization-0.9.1 lib/rails/role_authorization.rb
role_authorization-0.9.0 lib/rails/role_authorization.rb
role_authorization-0.6.2 lib/rails/role_authorization.rb
role_authorization-0.6.1 lib/rails/role_authorization.rb
role_authorization-0.6.0 lib/rails/role_authorization.rb