Skip to content

Commit 2949ab2

Browse files
committed
fix random avatar
1 parent 46b544c commit 2949ab2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def maybe_send_update_notification
149149

150150
def set_default_avatar
151151
unless self.image.present?
152-
random_avatar = File.new ::Rails.root.join("config/default_avatars/default_avatar_#{rand(5)}.png")
152+
random_avatar = File.new ::Rails.root.join("config/default_avatars/default_avatar_#{rand(1..5)}.png")
153153
self.image = random_avatar
154154
end
155155
end

0 commit comments

Comments
 (0)