Restore the default class for gravatars #1034
This commit is contained in:
parent
5ef63ec4bb
commit
caceb58947
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue