diff options
author | Marcelo G. Cajueiro <marcelocajueiro@gmail.com> | 2013-07-09 21:30:34 -0300 |
---|---|---|
committer | Marcelo G. Cajueiro <marcelocajueiro@gmail.com> | 2013-07-09 21:30:34 -0300 |
commit | 07e7c099b506afee4e1304c8cbe451271e51ee72 (patch) | |
tree | 5e9c241d85c62d0b406820cce3cb0cc2ee0b9924 /railties | |
parent | 16e4d013d8a264aed99deeba18d96a1ac541a715 (diff) | |
download | rails-07e7c099b506afee4e1304c8cbe451271e51ee72.tar.gz rails-07e7c099b506afee4e1304c8cbe451271e51ee72.tar.bz2 rails-07e7c099b506afee4e1304c8cbe451271e51ee72.zip |
Remove unnecessary string interpolation
Removed from controller template of scaffold generator.
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 |