Wednesday, July 4, 2007

Using Gravatar plugin to embed avatars in rails views

Gravatar offers service to keep your globally recognizable avatars (gravatar). This tiny plugin offers rails view helper to embed gravatars in your views. It can also be used in blog, forums applications to insert gravatar to be visible instead of email. Here is how to install it:

$ ruby script/plugin install

Here is sample usage in an erb template:

<%= gravatar_tag "", :size => "60x60"%>

The first parameter which is a email that user signed up with on is required. The other parameters are same as rails image_tag view helper.


smok said...

works perfect, thanks

Tim said...

how do I add d: => 'identicon' to make it worK?

Anonymous said...

nice, i just made many some other new emo backgrounds in my blog