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
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
associative?, default_options, eager_load?, eager_load_association, #field_type, field_type, #form_input_attributes, #initialize, permitted_attribute, #required?, searchable?, #serializable_options, transform_param, with_options
Constructor Details
This class inherits a constructor from Terrazzo::Field::Base
Class Method Details
.sortable? ⇒ Boolean
16 17 18 |
# File 'lib/terrazzo/field/password.rb', line 16 def sortable? false end |
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 |