Permalink
Browse files

Merge pull request #25432 from kamipo/polymorphic_reflection_is_not_u…

…sing_methods_from_through_reflection

`PolymorphicReflection` is not using the methods from `ThroughReflection`
  • Loading branch information...
eileencodes committed Oct 25, 2016
2 parents c5d46a8 + a26d4ad commit c0e656fe40afbec5fe5851074515273303a942e7
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/reflection.rb
@@ -136,8 +136,8 @@ def clear_reflections_cache # :nodoc:
# BelongsToReflection
# HasAndBelongsToManyReflection
# ThroughReflection
# PolymorphicReflection
# RuntimeReflection
# PolymorphicReflection
# RuntimeReflection
class AbstractReflection # :nodoc:
def through_reflection?
false
@@ -988,7 +988,7 @@ def derive_class_name
delegate(*delegate_methods, to: :delegate_reflection)
end
class PolymorphicReflection < ThroughReflection # :nodoc:
class PolymorphicReflection < AbstractReflection # :nodoc:
def initialize(reflection, previous_reflection)
@reflection = reflection
@previous_reflection = previous_reflection

0 comments on commit c0e656f

Please sign in to comment.