Sha256: 1a4ef28e91d23a007c01dbf99fbc1889ae8bd4ebd40045cf15edf7506c634ca5

Contents?: true

Size: 570 Bytes

Versions: 1

Compression:

Stored size: 570 Bytes

Contents

require 'restful_acl'

module RestfulAcl
  if defined? Rails::Railtie
    require 'rails'
    class Railtie < Rails::Railtie
      initializer 'restful_acl.insert_into_active_record' do
        ActiveSupport.on_load :active_record do
          RestfulAcl::Railtie.insert
        end
      end
    end
  end

  class Railtie
    def self.insert
      puts ">>>>>>>>>>"
      ActiveRecord::Base.send(:include, RestfulAcl::Model)
      ActionController::Base.send(:include, RestfulAcl::Controller)
      ActionView::Base.send(:include, RestfulAcl::Helper)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restful_acl-3.1.0 lib/restful_acl/railtie.rb