Changeset 8554
- Timestamp:
- 01/04/08 03:19:50 (3 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/base.rb (modified) (1 diff)
- trunk/activerecord/test/base_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r8546 r8554 1 1 *SVN* 2 3 * update_all ignores scoped :order and :limit, so post.comments.update_all doesn't try to include the comment order in the update statement. #10686 [Brendan Ribera] 2 4 3 5 * Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] trunk/activerecord/lib/active_record/base.rb
r8546 r8554 681 681 scope = scope(:find) 682 682 add_conditions!(sql, conditions, scope) 683 add_order!(sql, options[:order], scope)684 add_limit!(sql, options, scope)683 add_order!(sql, options[:order], nil) 684 add_limit!(sql, options, nil) 685 685 connection.update(sql, "#{name} Update") 686 686 end trunk/activerecord/test/base_test.rb
r8553 r8554 597 597 end 598 598 599 def test_update_all_ignores_order_limit_from_association 600 author = Author.find(1) 601 assert_nothing_raised do 602 assert_equal author.posts_with_comments_and_categories.length, author.posts_with_comments_and_categories.update_all("body = 'bulk update!'") 603 end 604 end 605 599 606 def test_update_many 600 607 topic_data = { 1 => { "content" => "1 updated" }, 2 => { "content" => "2 updated" } }