Class: ActiveRecord::Associations::CollectionProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/deprecated_finders/collection_proxy.rb

Defined Under Namespace

Modules: InterceptDynamicInstantiators

Class Method Summary collapse

Class Method Details

.inherited(subclass) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/active_record/deprecated_finders/collection_proxy.rb', line 27

def self.inherited(subclass)
  subclass.class_eval do
    # Ensure this get included first
    include ActiveRecord::Delegation::ClassSpecificRelation

    unless ActiveRecord::VERSION::MAJOR == 4 &&
        ActiveRecord::VERSION::MINOR == 2 &&
        ActiveRecord::VERSION::TINY > 1
      # Now override the method_missing definition
      include InterceptDynamicInstantiators
    end
  end
end