Aggravatar

You give it an email, it gives you a Gravatar. What more do you want?

How to Use It

First you include Aggravatar.

require 'aggravatar'
include Aggravatar

Then you ask it for a Gravatar.

gravatar_for("[email protected]")

Aggravatar even supports the wide array of options Gravatar gives you!

gravatar_for("[email protected]", :size => 80, :default => "/my_default_gravatar.png", :rating => 'g')

I know what you’re thinking, and I’ve already got you covered. You’re saying, “Hey, what if I need to add a class/title/id/etc to my Gravatar?!”

Well here you go:

gravatar_for("[email protected]", :html_attributes => {:class => "gravatar", :id => "my_gravatar", :title => "My Gravatar"}")

You’re not limited to just class, title, and id either! You can use any attribute you want! (even ones you make up!)

Copyright © 2009 Adam Tanner. See LICENSE for details.