Browse Source

valid method name check

pull/39/head
Matthew Phelan 3 years ago
parent
commit
55dedc1781
  1. 2
      app/models/case_log.rb

2
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

Loading…
Cancel
Save