Mark Provan
Mark Provan

Reputation: 1061

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/747fb50017944a3ca06b77fc2d51ba3b" />

The output is an img tag the works, but the tag is just displayed as text in the browser. How can I fix this?

Upvotes: 0

Views: 289

Answers (1)

Jesse Wolgamott
Jesse Wolgamott

Reputation: 40277

I would bet you are in Rails3, and the output is escaped HTML.

try

img_gravtar(@user.email).html_safe

Upvotes: 1

Related Questions