diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-04 03:19:50 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-04 03:19:50 +0000 |
commit | c36f8111a6e7f305adc8eac87ea006e2517b93df (patch) | |
tree | 640742120fb4c716c6eb4cab9a27f1b2f683a462 /activerecord/lib | |
parent | 25db1fc2014905d00795231dab2068f7a3497b04 (diff) | |
download | rails-c36f8111a6e7f305adc8eac87ea006e2517b93df.tar.gz rails-c36f8111a6e7f305adc8eac87ea006e2517b93df.tar.bz2 rails-c36f8111a6e7f305adc8eac87ea006e2517b93df.zip |
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
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |