Browse Source

refactor: lint

pull/2030/head
natdeanlewissoftwire 3 years ago
parent
commit
18ee0263c3
  1. 4
      app/services/csv/lettings_log_csv_service.rb

4
app/services/csv/lettings_log_csv_service.rb

@ -229,9 +229,9 @@ module Csv
ordered_questions.reject! { |q| q.id.match?(/age\d_known|rent_value_check/) } ordered_questions.reject! { |q| q.id.match?(/age\d_known|rent_value_check/) }
attributes = ordered_questions.flat_map do |question| attributes = ordered_questions.flat_map do |question|
if question.type == "checkbox" if question.type == "checkbox"
question.answer_options.keys.reject { |key| key == "divider" }.map do |key| question.answer_options.keys.reject { |key| key == "divider" }.map { |key|
ATTRIBUTE_MAPPINGS.fetch(key, key) ATTRIBUTE_MAPPINGS.fetch(key, key)
end.flatten }.flatten
else else
ATTRIBUTE_MAPPINGS.fetch(question.id, question.id) ATTRIBUTE_MAPPINGS.fetch(question.id, question.id)
end end

Loading…
Cancel
Save