Sha256: 7212f3afb2cc7b2168385214b5aa14cd84988103db08dbd3a4fdc94391bee9a5

Contents?: true

Size: 930 Bytes

Versions: 15

Compression:

Stored size: 930 Bytes

Contents

require File.join(%w{declarative_authorization helper})
if defined?(ActionController)
  require File.dirname(__FILE__) + '/declarative_authorization/controller/rails.rb'
end

if defined?(ActiveRecord)
  require File.join(%w{declarative_authorization in_model})
  require File.join(%w{declarative_authorization obligation_scope})
end

min_rails_version = Gem::Version.new('4.2.5.2')
if Gem::Version.new(Rails::VERSION::STRING) < min_rails_version
  raise "ae_declarative_authorization requires Rails #{min_rails_version}. You are using #{Rails::VERSION::STRING}."
end

require File.join(%w{declarative_authorization railsengine}) if defined?(::Rails::Engine)

if defined?(ActionController)
  ActionController::Base.send :include, Authorization::Controller::Rails
  ActionController::Base.helper Authorization::AuthorizationHelper
end

ActiveRecord::Base.send :include, Authorization::AuthorizationInModel if defined?(ActiveRecord)

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ae_declarative_authorization-1.1.0 lib/declarative_authorization.rb
ae_declarative_authorization-1.0.0 lib/declarative_authorization.rb
ae_declarative_authorization-0.13.0 lib/declarative_authorization.rb
ae_declarative_authorization-0.13.0.rc1 lib/declarative_authorization.rb
ae_declarative_authorization-0.12.1 lib/declarative_authorization.rb
ae_declarative_authorization-0.12.1.tim1 lib/declarative_authorization.rb
ae_declarative_authorization-0.12.0 lib/declarative_authorization.rb
ae_declarative_authorization-0.11.0.pre1 lib/declarative_authorization.rb
ae_declarative_authorization-0.11.0 lib/declarative_authorization.rb
ae_declarative_authorization-0.10.2 lib/declarative_authorization.rb
ae_declarative_authorization-0.10.1 lib/declarative_authorization.rb
ae_declarative_authorization-0.10.0 lib/declarative_authorization.rb
ae_declarative_authorization-0.9.2 lib/declarative_authorization.rb
ae_declarative_authorization-0.9.1 lib/declarative_authorization.rb
ae_declarative_authorization-0.9.0 lib/declarative_authorization.rb