From c36f8111a6e7f305adc8eac87ea006e2517b93df Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 4 Jan 2008 03:19:50 +0000 Subject: pdate_all ignores scoped :order and :limit, so post.comments.update_all doesn't try to include the comment order in the update statement. Closes #10686. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index d784f59d11..06d21f5525 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -680,8 +680,8 @@ module ActiveRecord #:nodoc: sql = "UPDATE #{table_name} SET #{sanitize_sql_for_assignment(updates)} " scope = scope(:find) add_conditions!(sql, conditions, scope) - add_order!(sql, options[:order], scope) - add_limit!(sql, options, scope) + add_order!(sql, options[:order], nil) + add_limit!(sql, options, nil) connection.update(sql, "#{name} Update") end -- cgit v1.2.3