diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/spawn_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index b734fc5c51..93fa30eb38 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -151,7 +151,7 @@ module ActiveRecord values = other.joins_values return if values.blank? - if other.klass == relation.klass + if other.klass >= relation.klass relation.joins_values += values else joins_dependency, rest = values.partition do |join| |