Skip to content

Commit

Permalink
Use += instead of << for string concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
zgchurch committed Aug 6, 2010
1 parent 8f74e29 commit 644eb7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/actionview-fields_for_with_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.