I am attempting to generate a plain text list from an array of arrays.
If I do this:
<% for currency in @rates -%>
<% if currency[2] == 'USD' -%>
<%= currency[2] -%> ............... <%= currency[4] %>
<% end -%>
<% end -%>
Then I see this:
=
USD ............... 1.203804
=
If I do this:
<% for currency in @rates -%>
<%= currency[2] -%> ............... <%= currency[4] %>
<% end -%>
Then I see this:
AED ............... 0.327697
ANG ............... 0.6879
ARS ............... 0.324296
AUD ............... 0.869868
How is the if statement causing the difference?
--
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
-~----------~----~----~----~------~----~------~--~---