README.textile in gravtastic-1.5.2 vs README.textile in gravtastic-1.6.0

- old
+ new

@@ -1,18 +1,18 @@ Easily add "Gravatars":http://gravatar.com to your Ruby objects. h2. Install - sudo gem install chrislloyd-gravtastic --source=http://gems.github.com + sudo gem install gravtastic h2. Usage Somewhere in your application you need to @require 'gravtastic'@. In Rails >= 2.1 you can forego this and just add a dependency gem dependency for Gravtastic. - config.gem 'gravtastic', :source => 'http://gems.github.com/' + config.gem 'gravtastic' The next step is to give your model a Gravatar: class User has_gravatar @@ -34,20 +34,20 @@ current_user.gravatar_url(:rating => 'R18', :size => 512) => "http://gravatar.com/e9e719b44653a9300e1567f09f6b2e9e.png?r=PG&s=512" current_user.gravatar_url(:secure => true) => "https://secure.gravatar.com/e9e719b44653a9300e1567f09f6b2e9e.png?r=PG" + +However, to DRY things up you can specify defaults in the class declaration. -PS. Bonus points for anybody who can tell me what that users email is! -PPS. Shame on Automattic for still using MD5! + has_gravatar :author_email, :defaults => { :rating => 'R18', :size => 20 } +Nice, now all the calls to gravatar_url will have the defaults you have specified. -h2. The Future +PS. Bonus points for anybody who can tell me what that users email is! -* "Datamapper":http://datamaper.org support - h2. Authors * "Chris Lloyd":http://chrislloyd.com.au * You @@ -62,9 +62,10 @@ h2. Thanks * "Xavier Shay":http://rhnh.net and others for "Enki":http://enkiblog.com (the reason this was written) +* "Matthew Moore":http://www.matthewpaulmoore.com/ for helpful suggestions h2. License Copyright (c) 2008 Chris Lloyd.