Sha256: bb64d7501139f0902fc280f600b25188124e8bfb7f39258d7907c4fa431c4125
Contents?: true
Size: 844 Bytes
Versions: 4
Compression:
Stored size: 844 Bytes
Contents
# frozen_string_literal: true require 'active_model_cachers/version' require 'active_model_cachers/config' require 'active_model_cachers/cache_service_factory' require 'active_record' require 'active_record/relation' require 'active_model_cachers/active_record/extension' module ActiveModelCachers def self.config @config ||= Config.new yield(@config) if block_given? return @config end end ActiveRecord::Base.send(:extend, ActiveModelCachers::ActiveRecord::Extension) gem_version = Gem::Version.new(ActiveRecord::VERSION::STRING) if gem_version < Gem::Version.new('4') require 'active_model_cachers/patches/patch_rails_3' end # https://github.com/rails/rails/pull/29018 if gem_version >= Gem::Version.new('5') && gem_version < Gem::Version.new('5.2') require 'active_model_cachers/patches/uninitialized_attribute' end
Version data entries
4 entries across 4 versions & 1 rubygems