ruby on rails - Good RoR Gravatar gem/plugin and detect if the gravatar account exists or not -
ruby on rails - Good RoR Gravatar gem/plugin and detect if the gravatar account exists or not -
i'm using mdeering's gravatar_image_tag plugin gravatar images users dilemma seek observe in code if user has gravatar:
if display gravatar image. if not, display local default image file on server.
i'm open using other plugins if offer functionality.
please provide code examples. help me larn best.
thanks!
you don't need gems/plugins. screencast explains need step-by-step. comes downwards using next helper method:
def avatar_url(user) default_url = "#{root_url}images/guest.png" gravatar_id = digest::md5.hexdigest(user.email.downcase) "http://gravatar.com/avatar/#{gravatar_id}.png?s=48&d=#{cgi.escape(default_url)}" end
ruby-on-rails gravatar
Comments
Post a Comment