Sha256: c0d1195cfd4c5baf60e2734e20605c1070726367c57fe0718b3fa107e14a0a67

Contents?: true

Size: 255 Bytes

Versions: 59

Compression:

Stored size: 255 Bytes

Contents

require 'active_record'
::ActiveRecord::Base.class_eval do
  def self.run_data_miner_on_belongs_to_associations
    reflect_on_all_associations(:belongs_to).each do |a|
      next if a.options[:polymorphic]
      a.klass.run_data_miner!
    end
  end
end

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
earth-0.5.0 lib/earth/active_record_ext.rb
earth-0.4.12 lib/earth/active_record_ext.rb
earth-0.4.11 lib/earth/active_record_ext.rb
earth-0.4.10 lib/earth/active_record_ext.rb
earth-0.4.9 lib/earth/active_record_ext.rb
earth-0.4.8 lib/earth/active_record_ext.rb
earth-0.4.7 lib/earth/active_record_ext.rb
earth-0.4.6 lib/earth/active_record_ext.rb
earth-0.4.5 lib/earth/active_record_ext.rb
earth-0.4.4 lib/earth/active_record_ext.rb
earth-0.4.3 lib/earth/active_record_ext.rb
earth-0.4.2 lib/earth/active_record_ext.rb
earth-0.4.1 lib/earth/active_record_ext.rb
earth-0.4.0 lib/earth/active_record_ext.rb
earth-0.3.15 lib/earth/active_record_ext.rb
earth-0.3.14 lib/earth/active_record_ext.rb
earth-0.3.13 lib/earth/active_record_ext.rb
earth-0.3.11 lib/earth/active_record_ext.rb
earth-0.3.10 lib/earth/active_record_ext.rb
earth-0.3.9 lib/earth/active_record_ext.rb