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.