From 3968825f5ff6a75cb83400716d56ec10f261e41a Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 16 Jan 2010 23:11:35 +0530 Subject: Make sure Model#active_relation always adds STI conditions if needed --- activerecord/lib/active_record/named_scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/named_scope.rb') diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index 47b69dec62..531419fd8e 100644 --- a/activerecord/lib/active_record/named_scope.rb +++ b/activerecord/lib/active_record/named_scope.rb @@ -29,7 +29,7 @@ module ActiveRecord current_scope = current_scoped_methods unless current_scope - finder_needs_type_condition? ? active_relation.where(type_condition) : active_relation.spawn + active_relation.spawn else construct_finder_arel({}, current_scoped_methods) end -- cgit v1.2.3