From 43758ba8302d97bf46d614d22349c9ebff99b49c Mon Sep 17 00:00:00 2001 From: Bertocq Date: Mon, 25 Sep 2017 22:52:38 +0200 Subject: [PATCH] Fix Style/EmptyCaseCondition rubocop issue --- .rubocop_todo.yml | 6 ------ app/models/concerns/verification.rb | 5 ++--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index fffae501c..6c84e94c6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -480,12 +480,6 @@ Style/DoubleNegation: Exclude: - 'app/models/flag.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/EmptyCaseCondition: - Exclude: - - 'app/models/concerns/verification.rb' - # Offense count: 2 # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS diff --git a/app/models/concerns/verification.rb b/app/models/concerns/verification.rb index a4770117e..b8d23f594 100644 --- a/app/models/concerns/verification.rb +++ b/app/models/concerns/verification.rb @@ -55,10 +55,9 @@ module Verification end def user_type - case - when level_three_verified? + if level_three_verified? :level_3_user - when level_two_verified? + elsif level_two_verified? :level_2_user else :level_1_user