Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
caceb589
Commit
caceb589
authored
Jun 10, 2012
by
Felix Schäfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore the default class for gravatars #1034
parent
5ef63ec4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
application_helper.rb
app/helpers/application_helper.rb
+1
-0
application_helper_test.rb
test/unit/helpers/application_helper_test.rb
+3
-0
No files found.
app/helpers/application_helper.rb
View file @
caceb589
...
...
@@ -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
...
...
test/unit/helpers/application_helper_test.rb
View file @
caceb589
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment