about summary refs log tree commit diff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-05-15 11:12:17 -0700
committerReverite <github@reverite.sh>2019-05-15 11:12:17 -0700
commit4cea89bf2e9ce7f73fccfc637191b1e039ad25ee (patch)
treecc559ad868e13d934ff539bd2da836ddad3ea5fc /app/models/user.rb
parentcdb159f27e2aeb2cf3bb184ac20b7056b013f714 (diff)
parentc1cf8c1636e0a639cced585f0cb234547a64d417 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 77e6a33b5..8985ebf53 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -88,7 +88,7 @@ class User < ApplicationRecord
   scope :confirmed, -> { where.not(confirmed_at: nil) }
   scope :enabled, -> { where(disabled: false) }
   scope :inactive, -> { where(arel_table[:current_sign_in_at].lt(ACTIVE_DURATION.ago)) }
-  scope :active, -> { confirmed.where(arel_table[:current_sign_in_at].gteq(ACTIVE_DURATION.ago)).joins(:account).where(accounts: { suspended: false }) }
+  scope :active, -> { confirmed.where(arel_table[:current_sign_in_at].gteq(ACTIVE_DURATION.ago)).joins(:account).where.not(accounts: { suspended_at: nil }) }
   scope :matches_email, ->(value) { where(arel_table[:email].matches("#{value}%")) }
   scope :emailable, -> { confirmed.enabled.joins(:account).merge(Account.searchable) }