From 7baecc48028e2d0cb57936ad10b9102ed129c9f9 Mon Sep 17 00:00:00 2001 From: robertomiranda Date: Fri, 18 Jan 2013 07:56:05 -0500 Subject: User Rails 4 find_by --- activerecord/test/cases/primary_keys_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/primary_keys_test.rb') diff --git a/activerecord/test/cases/primary_keys_test.rb b/activerecord/test/cases/primary_keys_test.rb index 8e5379cb1f..b6fc7b745e 100644 --- a/activerecord/test/cases/primary_keys_test.rb +++ b/activerecord/test/cases/primary_keys_test.rb @@ -54,7 +54,7 @@ class PrimaryKeysTest < ActiveRecord::TestCase Keyboard.delete_all keyboard = Keyboard.new(:name => 'HHKB') assert_nothing_raised { keyboard.save! } - assert_equal keyboard.id, Keyboard.find_by_name('HHKB').id + assert_equal keyboard.id, Keyboard.find_by(name: 'HHKB').id end def test_customized_primary_key_can_be_get_before_saving -- cgit v1.2.3