Sha256: dbaadd1423be024a9fd972838845c593a26f6f6b716a7c5a9153d9c1dd99baf0

Contents?: true

Size: 531 Bytes

Versions: 35

Compression:

Stored size: 531 Bytes

Contents

module RoleAuthorization
  class Railtie < Rails::Railtie
    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

35 entries across 35 versions & 1 rubygems

Version Path
role_authorization-0.5.9 lib/rails/role_authorization.rb
role_authorization-0.5.8 lib/rails/role_authorization.rb
role_authorization-0.5.7 lib/rails/role_authorization.rb
role_authorization-0.5.6 lib/rails/role_authorization.rb
role_authorization-0.5.5 lib/rails/role_authorization.rb
role_authorization-0.5.4 lib/rails/role_authorization.rb
role_authorization-0.5.3 lib/rails/role_authorization.rb
role_authorization-0.5.2 lib/rails/role_authorization.rb
role_authorization-0.5.1 lib/rails/role_authorization.rb
role_authorization-0.5.0 lib/rails/role_authorization.rb
role_authorization-0.4.5 lib/rails/role_authorization.rb
role_authorization-0.4.4 lib/rails/role_authorization.rb
role_authorization-0.4.3 lib/rails/role_authorization.rb
role_authorization-0.4.2 lib/rails/role_authorization.rb
role_authorization-0.4.1 lib/rails/role_authorization.rb
role_authorization-0.4.0 lib/rails/role_authorization.rb
role_authorization-0.3.9 lib/rails/role_authorization.rb
role_authorization-0.3.8 lib/rails/role_authorization.rb
role_authorization-0.3.7 lib/rails/role_authorization.rb
role_authorization-0.3.6 lib/rails/role_authorization.rb