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

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -