Module: GravatarHelper

Defined in:
lib/plugins/gravatar/lib/gravatar.rb

Overview

Since:

  • 2.0.0

Defined Under Namespace

Modules: PublicMethods

Constant Summary collapse

DEFAULT_OPTIONS =

These are the options that control the default behavior of the public methods. They can be overridden during the actual call to the helper, or you can set them in your environment.rb as such:

# Allow racier gravatars
GravatarHelper::DEFAULT_OPTIONS[:rating] = 'R'
{
  # The URL of a default image to display if the given email address does
  # not have a gravatar.
  :default => nil,
  
  # The default size in pixels for the gravatar image (they're square).
  :size => 50,
  
  # The maximum allowed MPAA rating for gravatars. This allows you to 
  # exclude gravatars that may be out of character for your site.
  :rating => 'PG',
  
  # The alt text to use in the img tag for the gravatar.  Since it's a
  # decorational picture, the alt text should be empty according to the
  # XHTML specs.
  :alt => '',

  # The title text to use for the img tag for the gravatar.
  :title => '',
  
  # The class to assign to the img tag for the gravatar.
  :class => 'gravatar',
  
  # Whether or not to display the gravatars using HTTPS instead of HTTP
  :ssl => false,
}