Module: FieldableForm::EntryValidations::ClassMethods

Defined in:
lib/fieldable_form/entry_validations.rb

Instance Method Summary collapse

Instance Method Details

#validate_fieldable_form_entry(form, values) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fieldable_form/entry_validations.rb', line 6

def validate_fieldable_form_entry(form, values)
  cattr_accessor :fieldable_form_getter_method, :fieldable_form_values_getter_method
  self.fieldable_form_getter_method = form.to_sym
  self.fieldable_form_values_getter_method = values.to_sym
  
  validate :ensure_fieldable_form_valid
end