Sha256: 0bc2da3abe60c0275eff8e40c6c1b5a467698900d03e145800670b1d2fed7c5c

Contents?: true

Size: 591 Bytes

Versions: 1

Compression:

Stored size: 591 Bytes

Contents

module RestrictCache
  class Railtie < ::Rails::Railtie
    initializer "restrict_cache" do
      require "restrict_cache/action_controller_ext"
      require "restrict_cache/active_record_ext"

      ActiveSupport.on_load(:action_controller) do
        ::ActionController::Base.send(:include, RestrictCache::ActionControllerExt)
      end

      ActiveSupport.on_load(:active_record) do
         ::ActiveRecord::Base.send(:include, RestrictCache::ActiveRecordExt::Base)
         ::ActiveRecord::Relation.send(:include, RestrictCache::ActiveRecordExt::Relation)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restrict_cache-0.1.1 lib/restrict_cache/railtie.rb