|
|
@ -20,9 +20,11 @@ class CaseLogValidator < ActiveModel::Validator |
|
|
|
|
|
|
|
|
|
|
|
def validate(record) |
|
|
|
def validate(record) |
|
|
|
question_to_validate = options[:previous_page] |
|
|
|
question_to_validate = options[:previous_page] |
|
|
|
|
|
|
|
if question_to_validate.present? |
|
|
|
public_send("validate_#{question_to_validate}", record) |
|
|
|
public_send("validate_#{question_to_validate}", record) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
class CaseLog < ApplicationRecord |
|
|
|
class CaseLog < ApplicationRecord |
|
|
|
validate :instance_validations |
|
|
|
validate :instance_validations |
|
|
|