GithubHelp home page GithubHelp logo

woods / gravatar-plugin Goto Github PK

View Code? Open in Web Editor NEW
53.0 3.0 12.0 108 KB

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

Home Page: http://github.com/woods/gravatar-plugin/

License: MIT License

Ruby 100.00%

gravatar-plugin's Introduction

Gravatar Plugin

This 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 ~/myapp
ruby script/plugin install git://github.com/woods/gravatar-plugin.git

or, if you’re using piston (worth it!):

cd ~/myapp/vendor/plugins
piston import git://github.com/woods/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

Thanks to Magnus Bergmark (github.com/Mange), who contributed the SSL support in this plugin, as well as a few minor fixes.

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 A. Woods
West Arete Computing, Inc.
http://westarete.com
scott at westarete dot com

TODO

  • Add specs for ssl support

  • Finish rdoc documentation

gravatar-plugin's People

Contributors

woods avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gravatar-plugin's Issues

Doesn't output HTML Code

when i use this plugin, view code like this:

<%= gravatar_for @user %>

html has been escaped .....

i'm using rails 3.1.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.