Class: RestMyCase::AccusationAttorneys::Presence

Inherits:
Each
  • Object
show all
Defined in:
lib/rest_my_case/accusation_attorneys/presence.rb

Instance Attribute Summary

Attributes inherited from Each

#attributes

Attributes inherited from Base

#base, #options

Instance Method Summary collapse

Methods inherited from Each

#check_validity!, #initialize, #validate

Methods inherited from Base

#initialize, #validate

Constructor Details

This class inherits a constructor from RestMyCase::AccusationAttorneys::Each

Instance Method Details

#validate_each(record, attr_name, value) ⇒ Object



5
6
7
# File 'lib/rest_my_case/accusation_attorneys/presence.rb', line 5

def validate_each(record, attr_name, value)
  record.errors.add(attr_name, :blank, options) if Helpers.blank?(value)
end