Extreme Ruby/Rails novice here: I'm trying to link_to a search action for each individual post contained in a block:
<% split_tags = post.tags.split(',') %> # returns ["food", "computers", "health"] %>
<p>Keywords: <%= split_tags.each {|tag| link_to(tag, front_search_tag_path(:tag => tag))}) %></p>
but all it returns is Keywords: ["food", "computers", "health"].
Shouldn't .each iterate over the array and provide a link to each search_tag_path with the tag as a parameter?
.eachreturns the original Array, so you want <% .each do |tag| %><%= link_to ... %><% end %>