Commit 71fbf4b663545ad327d08cf680b7c96fc36f0355
Exists in
master
Merge pull request #6 from aidewoode/fix-a-bug-of-using-in-sinatra
fix a bug of using in sinatra
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/letter_avatar/avatar.rb
@@ -20,7 +20,7 @@ module LetterAvatar | @@ -20,7 +20,7 @@ module LetterAvatar | ||
20 | def self.from_username(username) | 20 | def self.from_username(username) |
21 | identity = new | 21 | identity = new |
22 | identity.color = LetterAvatar::Colors.for(username) | 22 | identity.color = LetterAvatar::Colors.for(username) |
23 | - identity.letter = username.first.upcase | 23 | + identity.letter = username[0].upcase |
24 | 24 | ||
25 | identity | 25 | identity |
26 | end | 26 | end |