mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #25432 from kamipo/polymorphic_reflection_is_not_using_methods_from_through_reflection
`PolymorphicReflection` is not using the methods from `ThroughReflection`
This commit is contained in:
commit
c0e656fe40
1 changed files with 3 additions and 3 deletions
|
@ -136,8 +136,8 @@ module ActiveRecord
|
||||||
# BelongsToReflection
|
# BelongsToReflection
|
||||||
# HasAndBelongsToManyReflection
|
# HasAndBelongsToManyReflection
|
||||||
# ThroughReflection
|
# ThroughReflection
|
||||||
# PolymorphicReflection
|
# PolymorphicReflection
|
||||||
# RuntimeReflection
|
# RuntimeReflection
|
||||||
class AbstractReflection # :nodoc:
|
class AbstractReflection # :nodoc:
|
||||||
def through_reflection?
|
def through_reflection?
|
||||||
false
|
false
|
||||||
|
@ -988,7 +988,7 @@ module ActiveRecord
|
||||||
delegate(*delegate_methods, to: :delegate_reflection)
|
delegate(*delegate_methods, to: :delegate_reflection)
|
||||||
end
|
end
|
||||||
|
|
||||||
class PolymorphicReflection < ThroughReflection # :nodoc:
|
class PolymorphicReflection < AbstractReflection # :nodoc:
|
||||||
def initialize(reflection, previous_reflection)
|
def initialize(reflection, previous_reflection)
|
||||||
@reflection = reflection
|
@reflection = reflection
|
||||||
@previous_reflection = previous_reflection
|
@previous_reflection = previous_reflection
|
||||||
|
|
Loading…
Reference in a new issue