Created
April 26, 2011 14:33
-
-
Save mattd/942362 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BAD | |
{hosts, [<% @domains.each_with_index do |domain, i| -%>"<%= domain %>"<% if i == @domains.length - 1 -%>, <% end -%><% end -%>]}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GOOD | |
{hosts, [<% @domains.map! { |domain| "\"#{domain}\"" } -%><%= @domains.join(", ") %>]}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment