ruby on rails - Unwanted display of collection object after iterating through the collection in a view -


i have block iterates through collection of tags , creates links them.

the issue have after returns formatted links, returns entire actsastaggableon object text. wish display formatted links.

here's partial:

    <h4>tag cloud</h4> <div>   <%= tag_cloud @tags, %w[s m l ] |tag, css_class| %>   <%= link_to tag.name, tag_path(tag), :class => css_class %> <% end %> </div> 

image below shows how returning both formatted links , collection object - don't want display.

just want links not object returns afterwards

what need change?

in erb, <%= %> display whatever line of code returns. while <% %> executes line of code.

change <%= tag_cloud @tags, %w[s m l ] |tag, css_class| %> <% tag_cloud @tags, %w[s m l ] |tag, css_class| %> , object won't displayed.


Popular posts from this blog