Module: Pluckers::Features::BelongsToPolymorphicReflections
- Included in:
- Base
- Defined in:
- lib/pluckers/features/active_record_3_2/belongs_to_polymorphic_reflections.rb,
lib/pluckers/features/active_record_4_0/belongs_to_polymorphic_reflections.rb,
lib/pluckers/features/active_record_4_1/belongs_to_polymorphic_reflections.rb,
lib/pluckers/features/active_record_4_2/belongs_to_polymorphic_reflections.rb,
lib/pluckers/features/active_record_5_0/belongs_to_polymorphic_reflections.rb,
lib/pluckers/features/active_record_5_1/belongs_to_polymorphic_reflections.rb
Instance Method Summary collapse
Methods included from Pluckers::Features::Base::BelongsToPolymorphicReflections
#build_results, #configure_query
Instance Method Details
#active_record_belongs_to_polymorphic_reflection?(reflection) ⇒ Boolean
7 8 9 10 11 |
# File 'lib/pluckers/features/active_record_3_2/belongs_to_polymorphic_reflections.rb', line 7 def active_record_belongs_to_polymorphic_reflection? reflection reflection.is_a?(ActiveRecord::Reflection::AssociationReflection) && reflection.macro == :belongs_to && reflection.[:polymorphic] end |