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.2.3 lib/earth/active_record_ext.rb
earth-0.2.2 lib/earth/active_record_ext.rb
earth-0.2.1 lib/earth/active_record_ext.rb
earth-0.2.0 lib/earth/active_record_ext.rb
earth-0.1.4 lib/earth/active_record_ext.rb
earth-0.1.3 lib/earth/active_record_ext.rb
earth-0.1.2 lib/earth/active_record_ext.rb
earth-0.1.1 lib/earth/active_record_ext.rb
earth-0.1.0 lib/earth/active_record_ext.rb
earth-0.0.43 lib/earth/active_record_ext.rb
earth-0.0.42 lib/earth/active_record_ext.rb
earth-0.0.41 lib/earth/active_record_ext.rb
earth-0.0.40 lib/earth/active_record_ext.rb
earth-0.0.39 lib/earth/active_record_ext.rb
earth-0.0.38 lib/earth/active_record_ext.rb
earth-0.0.37 lib/earth/active_record_ext.rb
earth-0.0.36 lib/earth/active_record_ext.rb
earth-0.0.35 lib/earth/active_record_ext.rb
earth-0.0.34 lib/earth/active_record_ext.rb