From d11a6a039af859f185fedfb731f2edb5971c87b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 12 Sep 2015 14:29:26 +0200 Subject: [PATCH] refactors method to keep consistency in sync --- app/helpers/cache_keys_helper.rb | 2 +- lib/verification.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/helpers/cache_keys_helper.rb b/app/helpers/cache_keys_helper.rb index be23439dd..566b3cd81 100644 --- a/app/helpers/cache_keys_helper.rb +++ b/app/helpers/cache_keys_helper.rb @@ -10,7 +10,7 @@ module CacheKeysHelper if user_signed_in? user_status += ":signed" - user_status += ":verified" if current_user.verified_at.present? + user_status += ":verified" if current_user.level_two_or_three_verified? user_status += ":org" if current_user.organization? user_status += ":admin" if current_user.administrator? user_status += ":moderator" if current_user.moderator? diff --git a/lib/verification.rb b/lib/verification.rb index 4b3419b94..fe5172c65 100644 --- a/lib/verification.rb +++ b/lib/verification.rb @@ -41,8 +41,7 @@ module Verification end def unverified? - !level_two_verified? && !level_three_verified? + !level_two_or_three_verified? end - end