Class: PasswordField
- Inherits:
-
StringField
- Object
- Field
- StringField
- PasswordField
- Defined in:
- lib/yodel/models/core/fields/password_field.rb
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
Methods inherited from StringField
#search_terms_set, #untypecast
Methods inherited from Field
#display?, field_from_type, from_options, #include_in_search_keywords?, #index?, #inherited?, #initialize, #method_missing, #numeric?, #required?, #searchable?, #strip_nil?, #to_json, #to_str, #typecast, #unique?, #untypecast
Constructor Details
This class inherits a constructor from Field
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Field
Instance Method Details
#default_input_type ⇒ Object
3 4 5 |
# File 'lib/yodel/models/core/fields/password_field.rb', line 3 def default_input_type :password end |
#from_json(value, record) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/yodel/models/core/fields/password_field.rb', line 12 def from_json(value, record) if value.blank? throw :ignore_value else value.to_s end end |
#validate(record, errors) ⇒ Object
7 8 9 10 |
# File 'lib/yodel/models/core/fields/password_field.rb', line 7 def validate(record, errors) PasswordConfirmationValidation.validate(nil, self, name, nil, record, errors) super end |