Sha256: cd16b58f91edbf3368bc512bfe000e274535d6a169ea10e44af6eb2091032bb0

Contents?: true

Size: 935 Bytes

Versions: 3

Compression:

Stored size: 935 Bytes

Contents

if ActiveRecord::VERSION::STRING >= "4.1"
  require 'guard_against_physical_delete/support_counter_cache/associations/builder/belongs_to'
  ActiveRecord::Associations::Builder::BelongsTo.send(:include, GuardAgainstPhysicalDelete::SupportCounterCache::Associations::Builder::BelongsTo)
elsif ActiveRecord::VERSION::STRING >= "3.2"
  require 'guard_against_physical_delete/support_counter_cache/3.2_and_4.0/associations/builder/belongs_to'
  ActiveRecord::Associations::Builder::BelongsTo.send(:include, GuardAgainstPhysicalDelete::SupportCounterCache::Associations::Builder::BelongsTo)
elsif ActiveRecord::VERSION::STRING == "3.0.10"
  require 'guard_against_physical_delete/support_counter_cache/3.0.10/associations'
  ActiveRecord::Base.send(:include, GuardAgainstPhysicalDelete::SupportCounterCache::Associations)
else
  raise "guard_against_physical_delete doesn't support ActiveRecord version #{ActiveRecord::VERSION::STRING}"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
guard_against_physical_delete-1.0.2 lib/guard_against_physical_delete/support_counter_cache.rb
guard_against_physical_delete-1.0.1 lib/guard_against_physical_delete/support_counter_cache.rb
guard_against_physical_delete-1.0.0 lib/guard_against_physical_delete/support_counter_cache.rb