We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccb99db commit 7c971b6Copy full SHA for 7c971b6
app/helpers/application_helper.rb
@@ -21,9 +21,10 @@ def rank_badge(user)
21
admin_icon = fa_icon 'tools', text: ' Staff'
22
banned_icon = fa_icon 'ban', text: ' Suspended'
23
curator_icon = fa_icon 'hands-helping', text: ' Curator'
24
-
+
25
id = user
26
- user = User.find(user.to_i) if id.class == String || id.class == Integer
+ id_not_object = (id.instance_of? String) || (id.instance_of? Integer)
27
+ user = User.find_by(id: id.to_i) if id_not_object
28
return if user.nil?
29
30
if user.deactivated?
0 commit comments