Permalink
Browse files

Use += instead of << for string concatenation

  • Loading branch information...
1 parent 8f74e29 commit 644eb7c8d59b9481954cc66e871de82b61d89f4c @zgchurch zgchurch committed Aug 6, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/actionview-fields_for_with_template.rb
@@ -7,7 +7,7 @@ def fields_for_with_template(record_or_name_or_array, *args, &block)
args << options
result = fields_for record_or_name_or_array, *args, &block
- result << fields_for record_or_name_or_array, object.send(record_or_name_or_array).new, :child_index => "NEW_RECORD" do |f|
+ result += fields_for record_or_name_or_array, object.send(record_or_name_or_array).new, :child_index => "NEW_RECORD" do |f|
@template.concat %|<div class="template" style="display:none">|.html_safe
block.call f
@template.concat %|</div>|.html_safe
@@ -17,4 +17,4 @@ def fields_for_with_template(record_or_name_or_array, *args, &block)
end
end
end
-end
+end

0 comments on commit 644eb7c

Please sign in to comment.