Class: ThinkingSphinx::ActiveRecord::Depolymorph::OverriddenReflection

Inherits:
BaseReflection
  • Object
show all
Defined in:
lib/thinking_sphinx/active_record/depolymorph/overridden_reflection.rb

Overview

This overriding approach is only available in Rails 5.2+. This behaviour was preceded by AssociationReflection for Rails 4.1-5.1.

Defined Under Namespace

Modules: BuildJoinConstraint, JoinScope

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseReflection

#initialize

Constructor Details

This class inherits a constructor from ThinkingSphinx::ActiveRecord::Depolymorph::BaseReflection

Class Method Details

.overridden_classesObject



28
29
30
# File 'lib/thinking_sphinx/active_record/depolymorph/overridden_reflection.rb', line 28

def self.overridden_classes
  @overridden_classes ||= {}
end

Instance Method Details

#callObject



32
33
34
# File 'lib/thinking_sphinx/active_record/depolymorph/overridden_reflection.rb', line 32

def call
  klass.new name, nil, options, reflection.active_record
end