From c1bad2bc7ea9fecf1f2d8307f20b69d6596255e1 Mon Sep 17 00:00:00 2001 From: Manny Dinssa Date: Mon, 8 Jul 2024 10:58:53 +0100 Subject: [PATCH] Remove do...end block, Lint offence --- app/models/form/lettings/questions/location_id.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/form/lettings/questions/location_id.rb b/app/models/form/lettings/questions/location_id.rb index d462c83f7..59101592f 100644 --- a/app/models/form/lettings/questions/location_id.rb +++ b/app/models/form/lettings/questions/location_id.rb @@ -31,11 +31,11 @@ class Form::Lettings::Questions::LocationId < ::Form::Question scheme_location_ids = lettings_log.scheme.locations.visible.confirmed.pluck(:id) answer_options.select { |k, _v| scheme_location_ids.include?(k.to_i) } - .sort_by do |_, v| + .sort_by { |_, v| name = v["hint"].match(/[a-zA-Z].*/).to_s number = v["hint"].match(/\d+/).to_s.to_i [name, number] - end.to_h + }.to_h end def hidden_in_check_answers?(lettings_log, _current_user = nil)