Sha256: 79a707221f5658d02cfb1f6a3b13e3d95037aab7b18f2e3f90001f9ac908f33c
Contents?: true
Size: 833 Bytes
Versions: 2
Compression:
Stored size: 833 Bytes
Contents
module Commontator module SharedHelper def commontator_thread(commontable) user = Commontator.current_user_proc.call(self) thread = commontable.thread render(:partial => 'commontator/shared/thread', :locals => { :thread => thread, :user => user }).html_safe end def commontator_gravatar_image_tag(user, border = 1, options = {}) email = Commontator.commontator_email(user) || '' name = Commontator.commontator_name(user) || '' base = request.ssl? ? "s://secure" : "://www" hash = Digest::MD5.hexdigest(email) url = "http#{base}.gravatar.com/avatar/#{hash}?#{options.to_query}" image_tag(url, { :alt => name, :title => name, :border => border }) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
commontator-5.1.0 | lib/commontator/shared_helper.rb~ |
commontator-4.11.0 | lib/commontator/shared_helper.rb~ |