From 1ec608610ad9bfa8249f31aa164af8dc1bdc34c5 Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 27 May 2022 17:28:31 +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 58ea988fd..14a5be4af 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -54,7 +54,7 @@ class CaseLog < ApplicationRecord scope :filter_by_id, ->(id) { where(id:) } scope :filter_by_tenant_code, ->(tenant_code) { where("lower(tenant_code) ILIKE ?", "%#{tenant_code.downcase}%") } scope :filter_by_propcode, ->(propcode) { where("lower(propcode) ILIKE ?", "%#{propcode.downcase}%") } - scope :filter_by_postcode, ->(postcode_full) { where("lower(postcode_full) ILIKE ?", "%#{postcode_full.upcase.gsub(/\s+/, "")}%") } + scope :filter_by_postcode, ->(postcode_full) { where("lower(postcode_full) ILIKE ?", "%#{postcode_full.upcase.gsub(/\s+/, '')}%") } scope :search_by, lambda { |param| filter_by_id(param) .or(filter_by_tenant_code(param))