Steve Ross wrote:
> You are still getting all the indentation from the iterations that are
> skipped (i.e., where the currency is not USD).
> 
> <% for currency in @rates -%>
>    <% next unless currency[2] == 'USD' -%>
>    <%= currency[2] %> ............... <%= currency[4] %>
> <% end -%>
> 
> I'm not sure you need the minus sign on an emitting tag (<%=) to
> suppress the linefeed.
> 
> Does this help?

Yes.  Now that I know what is going on this works as I wish:

<% for currency in @rates
     usdd = "#{currency[2]} ............... #{currency[4]}" if
        currency[2] == 'USD'
   end -%>

      <%=usdd%>
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to