Commit caceb589 authored by Felix Schäfer's avatar Felix Schäfer

Restore the default class for gravatars #1034

parent 5ef63ec4
......@@ -962,6 +962,7 @@ module ApplicationHelper
[:default, :size, :rating, :filetype].each {|key| gravatarify_options[key] = options.delete key}
# Default size is 50x50 px
gravatarify_options[:size] ||= 50
options[:class] ||= 'gravatar'
gravatarify_options[:html] = options
gravatar_tag email, gravatarify_options
end
......
......@@ -669,6 +669,9 @@ RAW
assert avatar('jsmith <jsmith@somenet.foo>', :size => 24).include?('s=24')
# Non-avatar options should be considered html options
assert avatar('jsmith <jsmith@somenet.foo>', :title => 'John Smith').include?('title="John Smith"')
# The default class of the img tag should be gravatar
assert avatar('jsmith <jsmith@somenet.foo>').include?('class="gravatar"')
assert !avatar('jsmith <jsmith@somenet.foo>', :class => 'picture').include?('class="gravatar"')
assert_nil avatar('jsmith')
assert_nil avatar(nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment