Class: Para::AttributeField::PasswordField

Inherits:
AttributeField::Base
  • Object
show all
Defined in:
lib/para/attribute_field/password.rb

Instance Method Summary collapse

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, options = {})
  options.reverse_merge!(type: 'password', field_type: 'password')
  super(model, options)
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