Commit 6db0a250 authored by Peter Leitzen's avatar Peter Leitzen Committed by Sean McGivern
Browse files

Remove User#internal_attributes method

It's not needed anymore as we've replaced boolean `support_bot` with
enum `bot_type`.
parent 7b48337a2a29
......@@ -537,20 +537,16 @@ def full_path
username
end
def self.internal_attributes
[:ghost]
end
def internal?
self.class.internal_attributes.any? { |a| self[a] }
ghost?
end
def self.internal
where(Hash[internal_attributes.zip([true] * internal_attributes.size)])
where(ghost: true)
end
def self.non_internal
where(internal_attributes.map { |attr| "#{attr} IS NOT TRUE" }.join(" AND "))
where('ghost IS NOT TRUE')
end
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment