Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby on Rails plugin that supplies view helpers for displaying globally-recognized avatars (gravatars) more easily.
Ruby
branch: master

This branch is 14 commits ahead, 2 commits behind woods:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
MIT-LICENSE
README.rdoc
Rakefile
about.yml
init.rb

README.rdoc

Gravatar Plugin for Ruby on Rails

This Ruby on Rails plugin provides a handful of view helpers for displaying gravatars (globally-recognized avatars).

Gravatars allow users to configure an avatar to go with their email address at a central location: gravatar.com. Gravatar-aware websites (such as yours) can then look up and display each user's preferred avatar, without having to handle avatar management. The user gets the benefit of not having to set up an avatar for each site that they post on.

Installation

cd ~/my-rails-app
rails plugin install git://github.com/westarete/gravatar-plugin.git

Example

If you represent your users with a model that has an email method (typical for most rails authentication setups), then you can simply use this method in your views:

<%= gravatar_for @user %>

This will be replaced with the full HTML img tag necessary for displaying that user's gravatar.

Other helpers are documented under GravatarHelper::PublicMethods.

Acknowledgments

Thank you to the many people who have contributed features and bug fixes:

github.com/westarete/gravatar-plugin/contributors

The following people have also written gravatar-related Ruby libraries:

  • Seth Rasmussen created the gravatar gem

  • Matt McCray has also created a gravatar plugin

Author

Scott Woods
West Arete
http://westarete.com

TODO

  • Add specs for ssl support

  • Finish rdoc documentation

Something went wrong with that request. Please try again.