Browse Source

feat: actually clear values

pull/1687/head
natdeanlewissoftwire 3 years ago
parent
commit
a66cc4334c
  1. 2
      app/models/log.rb

2
app/models/log.rb

@ -108,7 +108,7 @@ class Log < ApplicationRecord
question = form.questions.find { |q| q.id == error.attribute.to_s } question = form.questions.find { |q| q.id == error.attribute.to_s }
if question.type == "checkbox" if question.type == "checkbox"
question.answer_keys_without_dividers { |attribute| public_send("#{attribute}=", nil) } question.answer_keys_without_dividers.each { |attribute| public_send("#{attribute}=", nil) }
else else
public_send("#{error.attribute}=", nil) public_send("#{error.attribute}=", nil)
end end

Loading…
Cancel
Save