diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-16 23:11:35 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-16 23:11:35 +0530 |
commit | 3968825f5ff6a75cb83400716d56ec10f261e41a (patch) | |
tree | 2a595291556ae52b920036e596fd2b7f257e4ab2 /activerecord/lib/active_record/named_scope.rb | |
parent | cfdfd899262c79c37ac89e030f4d90c8f9868b50 (diff) | |
download | rails-3968825f5ff6a75cb83400716d56ec10f261e41a.tar.gz rails-3968825f5ff6a75cb83400716d56ec10f261e41a.tar.bz2 rails-3968825f5ff6a75cb83400716d56ec10f261e41a.zip |
Make sure Model#active_relation always adds STI conditions if needed
Diffstat (limited to 'activerecord/lib/active_record/named_scope.rb')
-rw-r--r-- | activerecord/lib/active_record/named_scope.rb | 2 |
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 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 |