diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2019-04-12 15:16:06 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-04-12 15:16:06 +0300 |
commit | a69f889101b9feacd6ac55ebf7e3c6334abb792f (patch) | |
tree | a07b9a75add0a2bb21278d61d1cb5047765c5f0a /app/models | |
parent | 7457c1e1229cd1e90e608e8b247e2fbb217f05b6 (diff) |
Remove User#internal_attributes method
It's not needed anymore as we've replaced boolean `support_bot` with
enum `bot_type`.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d3524bfd6ae..b08ac638949 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -537,20 +537,16 @@ class User < ApplicationRecord 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 # |