From cca17296de14048b2a2a67576224b8cc29395ede Mon Sep 17 00:00:00 2001 From: Pavel Pravosud Date: Fri, 11 Jan 2013 10:26:39 +0700 Subject: [PATCH] More consistent quotes in scaffold generator --- .../rails/scaffold_controller/templates/controller.rb | 4 ++-- .../test/generators/scaffold_controller_generator_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb b/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb index 6f7eb072294d5..e813437d753aa 100644 --- a/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +++ b/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb @@ -31,7 +31,7 @@ def create if @<%= orm_instance.save %> redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %> else - render action: "new" + render action: 'new' end end @@ -40,7 +40,7 @@ def update if @<%= orm_instance.update("#{singular_table_name}_params") %> redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully updated.'" %> else - render action: "edit" + render action: 'edit' end end diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb index bd99e786443d8..c34ce285e3a05 100644 --- a/railties/test/generators/scaffold_controller_generator_test.rb +++ b/railties/test/generators/scaffold_controller_generator_test.rb @@ -162,7 +162,7 @@ def self.all(klass) def test_new_hash_style run_generator assert_file "app/controllers/users_controller.rb" do |content| - assert_match(/render action: "new"/, content) + assert_match(/render action: 'new'/, content) end end end