aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/named_scope.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/named_scope.rb')
-rw-r--r--activerecord/lib/active_record/named_scope.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb
index 02ee2d1401..5959265d5e 100644
--- a/activerecord/lib/active_record/named_scope.rb
+++ b/activerecord/lib/active_record/named_scope.rb
@@ -27,7 +27,7 @@ module ActiveRecord
Scope.new(self, options, &block)
else
unless scoped?(:find)
- finder_needs_type_condition? ? arel_table.where(type_condition) : arel_table.spawn
+ finder_needs_type_condition? ? active_relation.where(type_condition) : active_relation.spawn
else
construct_finder_arel_with_includes
end