aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/dirty_test.rb
diff options
context:
space:
mode:
authorSebastian Martinez <sebastian@wyeworks.com>2011-03-26 11:42:26 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-26 12:09:04 -0300
commit45c233ef819dc7b67e259dd73f24721fec28b8c8 (patch)
tree7b35f2f44535f2ad0edc896bcd06be94e960e20a /activerecord/test/cases/dirty_test.rb
parenteb8beb32b072f581720111d87855610403b3bb0c (diff)
downloadrails-45c233ef819dc7b67e259dd73f24721fec28b8c8.tar.gz
rails-45c233ef819dc7b67e259dd73f24721fec28b8c8.tar.bz2
rails-45c233ef819dc7b67e259dd73f24721fec28b8c8.zip
Removed #update_attribute method. New #update_column method.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/test/cases/dirty_test.rb')
-rw-r--r--activerecord/test/cases/dirty_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb
index a6738fb654..b75482a956 100644
--- a/activerecord/test/cases/dirty_test.rb
+++ b/activerecord/test/cases/dirty_test.rb
@@ -413,7 +413,7 @@ class DirtyTest < ActiveRecord::TestCase
with_partial_updates(Topic) do
Topic.create!(:author_name => 'Bill', :content => {:a => "a"})
topic = Topic.select('id, author_name').first
- topic.update_attribute :author_name, 'John'
+ topic.update_column :author_name, 'John'
topic = Topic.first
assert_not_nil topic.content
end
@@ -487,7 +487,8 @@ class DirtyTest < ActiveRecord::TestCase
assert !pirate.previous_changes.key?('created_on')
pirate = Pirate.find_by_catchphrase("Ahoy!")
- pirate.update_attribute(:catchphrase, "Ninjas suck!")
+ pirate.catchphrase = "Ninjas suck!"
+ pirate.save(:validations => false)
assert_equal 2, pirate.previous_changes.size
assert_equal ["Ahoy!", "Ninjas suck!"], pirate.previous_changes['catchphrase']