Class: ThinkingSphinx::ActiveRecord::Depolymorph::AssociationReflection
- Inherits:
-
BaseReflection
- Object
- BaseReflection
- ThinkingSphinx::ActiveRecord::Depolymorph::AssociationReflection
- Defined in:
- lib/thinking_sphinx/active_record/depolymorph/association_reflection.rb
Overview
This custom association approach is only available in Rails 4.1-5.1. This behaviour is superseded by OverriddenReflection for Rails 5.2, and was preceded by ScopedReflection for Rails 4.0.
Instance Method Summary collapse
-
#call ⇒ Object
Since Rails 4.2, the macro argument has been removed.
Methods inherited from BaseReflection
Constructor Details
This class inherits a constructor from ThinkingSphinx::ActiveRecord::Depolymorph::BaseReflection
Instance Method Details
#call ⇒ Object
Since Rails 4.2, the macro argument has been removed. The underlying behaviour remains the same, though.
11 12 13 14 15 16 17 |
# File 'lib/thinking_sphinx/active_record/depolymorph/association_reflection.rb', line 11 def call if explicit_macro? klass.new name, nil, , reflection.active_record else klass.new reflection.macro, name, nil, , reflection.active_record end end |