From d4497883aecb2690cfac8445121336e227ab09b7 Mon Sep 17 00:00:00 2001 From: magicmilo Date: Wed, 27 Oct 2021 11:25:48 +0100 Subject: [PATCH] rubocop --- app/models/case_log.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/case_log.rb b/app/models/case_log.rb index ef4655a7a..b7e7e1c0f 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -59,7 +59,7 @@ class CaseLogValidator < ActiveModel::Validator if record.outstanding_rent_or_charges == "Yes" && record.outstanding_amount.blank? record.errors.add :outstanding_amount, "You must answer the oustanding amout question if you have outstanding rent or charges." end - if record.outstanding_rent_or_charges == "No" && !record.outstanding_amount.blank? + if record.outstanding_rent_or_charges == "No" && record.outstanding_amount.present? record.errors.add :outstanding_amount, "You must not answer the oustanding amout question if you don't have outstanding rent or charges." end end