Class: Trestle::Form::Fields::PasswordField

Inherits:
FormControl show all
Defined in:
lib/trestle/form/fields/password_field.rb

Instance Attribute Summary

Attributes inherited from Trestle::Form::Field

#block, #builder, #name, #options, #template

Instance Method Summary collapse

Methods inherited from FormControl

#input_group, #input_group_addon, #normalize_options!, #render

Methods inherited from Trestle::Form::Field

#errors, #form_group, #initialize, #normalize_options!, #readonly?, #render

Constructor Details

This class inherits a constructor from Trestle::Form::Field

Instance Method Details

#defaultsObject



6
7
8
# File 'lib/trestle/form/fields/password_field.rb', line 6

def defaults
  super.merge(autocomplete: "new-password")
end

#fieldObject



2
3
4
# File 'lib/trestle/form/fields/password_field.rb', line 2

def field
  builder.raw_password_field(name, options)
end