Browse Source

Remove do...end block, Lint offence

pull/2499/head
Manny Dinssa 2 years ago
parent
commit
c1bad2bc7e
  1. 4
      app/models/form/lettings/questions/location_id.rb

4
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) scheme_location_ids = lettings_log.scheme.locations.visible.confirmed.pluck(:id)
answer_options.select { |k, _v| scheme_location_ids.include?(k.to_i) } 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 name = v["hint"].match(/[a-zA-Z].*/).to_s
number = v["hint"].match(/\d+/).to_s.to_i number = v["hint"].match(/\d+/).to_s.to_i
[name, number] [name, number]
end.to_h }.to_h
end end
def hidden_in_check_answers?(lettings_log, _current_user = nil) def hidden_in_check_answers?(lettings_log, _current_user = nil)

Loading…
Cancel
Save