Skip to content

Commit 5c96eca

Browse files
committed
HasAvatar cleanup, doesnt include AvatarHelper anymore
1 parent 6939958 commit 5c96eca

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/letter_avatar/has_avatar.rb

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ module HasAvatar
33
def self.included(base)
44
base.send :include, InstanceMethods
55
base.extend ClassMethods
6-
base.class_eval do
7-
include LetterAvatar::AvatarHelper
8-
end
96
end
107

118
module ClassMethods
@@ -17,11 +14,11 @@ def self.included(base)
1714
end
1815

1916
def avatar_path(size = 64)
20-
letter_avatar_for(name, size)
17+
LetterAvatar.generate(name, size)
2118
end
2219

2320
def avatar_url(size = 64)
24-
letter_avatar_url(name, size)
21+
LetterAvatar.path_to_url(avatar_path(size))
2522
end
2623

2724
end

0 commit comments

Comments
 (0)