Class: ActiveModel::Validations::HashKeysValidator

Inherits:
ArrayValidator
  • Object
show all
Defined in:
lib/can_has_validations/validators/hash_keys_validator.rb

Instance Attribute Summary

Attributes inherited from ArrayValidator

#validators

Instance Method Summary collapse

Methods inherited from ArrayValidator

#initialize, #validate_one

Constructor Details

This class inherits a constructor from ActiveModel::Validations::ArrayValidator

Instance Method Details

#validate_each(record, attribute, hash) ⇒ Object



24
25
26
# File 'lib/can_has_validations/validators/hash_keys_validator.rb', line 24

def validate_each(record, attribute, hash)
  super(record, attribute, Hash(hash).keys)
end