From 0433d79724fc2f97208b1e3aec43335c7c33f7cc Mon Sep 17 00:00:00 2001 From: Amparo Luna + Guillermo Iguaran Date: Wed, 2 Jan 2013 16:55:29 -0500 Subject: Updating default application templates to use update instead of update_attributes --- railties/test/generators/scaffold_controller_generator_test.rb | 2 +- railties/test/generators/scaffold_generator_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/test') diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb index f13305adb0..290e4b57cc 100644 --- a/railties/test/generators/scaffold_controller_generator_test.rb +++ b/railties/test/generators/scaffold_controller_generator_test.rb @@ -35,7 +35,7 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase end assert_instance_method :update, content do |m| - assert_match(/@user\.update_attributes\(user_params\)/, m) + assert_match(/@user\.update\(user_params\)/, m) assert_match(/@user\.errors/, m) end diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index f3f2c170ee..fbc9cd1321 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -45,7 +45,7 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase end assert_instance_method :update, content do |m| - assert_match(/@product_line\.update_attributes\(product_line_params\)/, m) + assert_match(/@product_line\.update\(product_line_params\)/, m) assert_match(/@product_line\.errors/, m) end @@ -162,7 +162,7 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase end assert_instance_method :update, content do |m| - assert_match(/@admin_role\.update_attributes\(admin_role_params\)/, m) + assert_match(/@admin_role\.update\(admin_role_params\)/, m) assert_match(/@admin_role\.errors/, m) end -- cgit v1.2.3