开发者

Gravatar Imager Url not Working - Rails

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜