Class: Para::AttributeField::PasswordField
- Defined in:
- lib/para/attribute_field/password.rb
Instance Attribute Summary
Attributes inherited from Base
#field_method, #field_type, #model, #name, #options, #type
Instance Method Summary collapse
-
#initialize(model, options = {}) ⇒ PasswordField
constructor
A new instance of PasswordField.
- #parse_input(params, resource) ⇒ Object
- #value_for(instance) ⇒ Object
Methods inherited from Base
#attribute_column_path, #determine_name_and_field_method!, #excerptable_value?, #field_name, field_option, #field_options, field_types, register, #searchable?, #type?
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 |