From d39fc60f929e9e659463cbd14651aa55eeb94611 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Sat, 26 Sep 2015 13:08:09 +0200 Subject: [PATCH] fixes unverified user's scope --- app/models/concerns/verification.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/verification.rb b/app/models/concerns/verification.rb index fe5172c65..a859b4c46 100644 --- a/app/models/concerns/verification.rb +++ b/app/models/concerns/verification.rb @@ -5,7 +5,7 @@ module Verification scope :level_three_verified, -> { where.not(verified_at: nil) } scope :level_two_verified, -> { where("users.confirmed_phone IS NOT NULL AND users.residence_verified_at IS NOT NULL") } scope :level_two_or_three_verified, -> { where("users.verified_at IS NOT NULL OR (users.confirmed_phone IS NOT NULL AND users.residence_verified_at IS NOT NULL)") } - scope :unverified, -> { where("users.verified_at IS NULL AND (users.confirmed_phone IS NULL OR users.residence_verified_at IS NOT NULL)") } + scope :unverified, -> { where("users.verified_at IS NULL AND (users.residence_verified_at IS NULL OR users.confirmed_phone IS NULL)") } end def verification_email_sent?