Permalink
Browse files

Remove unnecessary string interpolation

Removed from controller template of scaffold generator.
  • Loading branch information...
1 parent 16e4d01 commit 07e7c099b506afee4e1304c8cbe451271e51ee72 @MarceloCajueiro MarceloCajueiro committed Jul 10, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb
@@ -59,9 +59,9 @@ def set_<%= singular_table_name %>
# 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

0 comments on commit 07e7c09

Please sign in to comment.