mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fix Fixnum is deprecated in Ruby 2.4.
This commit is contained in:
@@ -69,7 +69,7 @@ module PrettyText
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get_current_user(user_id)
|
def get_current_user(user_id)
|
||||||
return unless Fixnum === user_id
|
return unless user_id.is_a?(Integer)
|
||||||
{ staff: User.where(id: user_id).where("moderator OR admin").exists? }
|
{ staff: User.where(id: user_id).where("moderator OR admin").exists? }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user