diff --git a/app/models/case_log.rb b/app/models/case_log.rb index f6bf7639e..d81b83f2c 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -20,7 +20,7 @@ class CaseLogValidator < ActiveModel::Validator def validate(record) question_to_validate = options[:previous_page] - if question_to_validate.present? + if respond_to?("validate_#{question_to_validate}") public_send("validate_#{question_to_validate}", record) end end