I have a problem trying to make a list from a acts_as_taggable_on tag_list
I have tag list array, and I want to list it so im trying this:
<%= proyects.tag_list.each do |tagsx| %>
* <%= tagsx %> <br>
<% end %>
And I get the list im looking for, but also the whole array again…
When it renders, looks like this..
* AJAX
* Rails
* Heroku
* Prototype
AJAX, Rails, Heroku, Prototype
Any ideas on getting rid of the last line?
Or do you guys know a more efficient way of achieving this?
Thanks in advance.
Change this:
to this:
You don’t want to output the return value of the
.eachcall, just the elements of the array. CallingArray#eachwith a block returns the array (as you are):and that’s were the comma delimited list is coming from.