diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-09 19:56:56 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-09 19:56:56 -0700 |
commit | 54d893f9d8d080596c8ce74f28ef181b60e2994f (patch) | |
tree | 14e342ed255886133d4275672ef2ef26bd59229f /railties | |
parent | a4c0281dada222d350dc337c3b283e4254b07f1b (diff) | |
parent | 07e7c099b506afee4e1304c8cbe451271e51ee72 (diff) | |
download | rails-54d893f9d8d080596c8ce74f28ef181b60e2994f.tar.gz rails-54d893f9d8d080596c8ce74f28ef181b60e2994f.tar.bz2 rails-54d893f9d8d080596c8ce74f28ef181b60e2994f.zip |
Merge pull request #11385 from MarceloCajueiro/remove_string_interpolation
Remove unnecessary string interpolation
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb | 4 |
1 files changed, 2 insertions, 2 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 73e89086a5..0e69aa101f 100644 --- a/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +++ b/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb @@ -59,9 +59,9 @@ class <%= controller_class_name %>Controller < ApplicationController # Only allow a trusted parameter "white list" through. def <%= "#{singular_table_name}_params" %> <%- if attributes_names.empty? -%> - params[<%= ":#{singular_table_name}" %>] + params[:<%= singular_table_name %>] <%- else -%> - params.require(<%= ":#{singular_table_name}" %>).permit(<%= attributes_names.map { |name| ":#{name}" }.join(', ') %>) + params.require(:<%= singular_table_name %>).permit(<%= attributes_names.map { |name| ":#{name}" }.join(', ') %>) <%- end -%> end end |