Browse Source

previous_page null check

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

2
app/models/case_log.rb

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

Loading…
Cancel
Save