I'm using a gem called 'img_gravatar' to get avatars for my users profiles. The syntax is as follows:
img_gravtar(@user.email)
Which outputs
<img src="http://www.gravatar.com/avatar/747fb50017944a3开发者_开发知识库ca06b77fc2d51ba3b" />
The output is an img tag the works, but the tag is just displayed as text in the browser. How can I fix this?
I would bet you are in Rails3, and the output is escaped HTML.
try
img_gravtar(@user.email).html_safe
精彩评论