Sha256: 2ce9bce6ddea052e293b35408f73673ebaa3b807cec9ec60ad7b027e7ee448b3

Contents?: true

Size: 462 Bytes

Versions: 3

Compression:

Stored size: 462 Bytes

Contents

module Cachers
  class Railtie < Rails::Railtie

    config.before_initialize do
      Dir["#{Rails.root}/app/cachers/**/*_cacher.rb"].each do |file|
        load file
      end
    end

    initializer 'cachers.active_record' do
      ActiveSupport.on_load :active_record do
        ::ActiveRecord::Base.include(
          Cachers::Extensions::ActiveRecord::Base
        )
      end
    end

    rake_tasks do
      load 'tasks/cachers.rake'
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cachers-4.1.0.2 lib/cachers/railtie.rb
cachers-4.1.0.1 lib/cachers/railtie.rb
cachers-4.1.0.0 lib/cachers/railtie.rb