ruby - Rails acts_as_taggable titelize tag list -
i have code outputs list of users' interests , can't figure out how titleize each tag of list.
<%= raw follower.pursuit_list.map { |p| link_to p, "#" }.join(', ') %>
this code should it:
follower.pursuit_list.map { |p| link_to p.name.titleize, "#" }.join(', ').html_safe it implies pursuitlist object responds name method, consider tag's name in code.
Comments
Post a Comment