diff options
author | ThibG <thib@sitedethib.com> | 2019-06-20 19:19:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 19:19:30 +0200 |
commit | f717d7a92da83703d270af50310fa3483b503417 (patch) | |
tree | e512bfc11eae35fa601522672f47261a0972c484 /app/models/user.rb | |
parent | f4b008906dcfc3333ec533884aa10b65f8ae41a2 (diff) | |
parent | 3771a993b7e19bc0e756e7f727f10ddd14c10c93 (diff) |
Merge pull request #1134 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index c24741ff1..fcfb79612 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.not(accounts: { suspended_at: nil }) } + scope :active, -> { confirmed.where(arel_table[:current_sign_in_at].gteq(ACTIVE_DURATION.ago)).joins(:account).where(accounts: { suspended_at: nil }) } scope :matches_email, ->(value) { where(arel_table[:email].matches("#{value}%")) } scope :emailable, -> { confirmed.enabled.joins(:account).merge(Account.searchable) } |