Class: Para::AttributeField::PasswordField
- Inherits:
-
AttributeField::Base
- Object
- AttributeField::Base
- Para::AttributeField::PasswordField
- Defined in:
- lib/para/attribute_field/password.rb
Instance Method Summary collapse
-
#initialize(model, options = {}) ⇒ PasswordField
constructor
A new instance of PasswordField.
- #parse_input(params, resource) ⇒ Object
- #value_for(instance) ⇒ Object
Constructor Details
#initialize(model, options = {}) ⇒ PasswordField
Returns a new instance of PasswordField.
6 7 8 9 |
# File 'lib/para/attribute_field/password.rb', line 6 def initialize(model, = {}) .reverse_merge!(type: 'password', field_type: 'password') super(model, ) end |
Instance Method Details
#parse_input(params, resource) ⇒ Object
15 16 17 |
# File 'lib/para/attribute_field/password.rb', line 15 def parse_input(params, resource) params[name] = params[name].presence if resource.respond_to?(:"#{name}=") end |
#value_for(instance) ⇒ Object
11 12 13 |
# File 'lib/para/attribute_field/password.rb', line 11 def value_for(instance) nil end |