Is it possible to render a link_to element on a webpage using a .each
from an array? Such as

<% Alphabet = ['A','B','C','D'...,'Z'] %>


<%= Alphabet.each{|letter| link_to '#{letter}, :action => 'alphabet,
:letter => letter %>

to replace:

<% for letter in Alphabet %>
    <%= link_to '#{letter}, :action => 'alphabet', :letter => letter %>
<% end %>

This obviously isn't a matter of life and death, but i prefer to use
blocks whenever possible.
-- 
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