How do I do the following in one line?
<% song.albums.each do |album| %>
<%= link_to album.title, album %><br />
<% end %>
I've tried two approaches that haven't worked.
This gives me the entire array:
<%= song.albums.each {|album| link_to album.title, album } %>
And this output is blank:
<% song.albums.each {|album| link_to album.title, album } %>
, I'm saving all the CSS formatting for the end of the project. I agree that it's tacky for now. Thanks again. – Brett May 15 '12 at 17:28