Class: Terrazzo::Field::Password
- Defined in:
- lib/terrazzo/field/password.rb
Constant Summary collapse
- MASKED =
"\u2022" * 8
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#attribute, #data, #options, #page, #resource
Instance Method Summary collapse
Methods inherited from Base
associative?, default_options, eager_load?, #field_type, field_type, #form_input_attributes, #initialize, permitted_attribute, #required?, searchable?, #serializable_options, sortable?, transform_param, with_options
Constructor Details
This class inherits a constructor from Terrazzo::Field::Base
Instance Method Details
#serialize_value(mode) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/terrazzo/field/password.rb', line 6 def serialize_value(mode) case mode when :form nil else data.present? ? MASKED : nil end end |