Class: Bureaucrat::Widgets::PasswordInput
- Defined in:
- lib/bureaucrat/widgets.rb
Overview
Class for password inputs
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
-
#initialize(attrs = nil, render_value = false) ⇒ PasswordInput
constructor
A new instance of PasswordInput.
- #input_type ⇒ Object
- #render(name, value, attrs = nil) ⇒ Object
Methods inherited from Widget
#build_attrs, #has_changed?, #hidden?, id_for_label, #initialize_copy, #needs_multipart?, #value_from_formdata
Methods included from Utils
#blank_value?, #conditional_escape, #escape, #flatatt, #format_string, #make_bool, #make_float, #mark_safe, #pretty_name
Constructor Details
#initialize(attrs = nil, render_value = false) ⇒ PasswordInput
Returns a new instance of PasswordInput.
79 80 81 82 |
# File 'lib/bureaucrat/widgets.rb', line 79 def initialize(attrs = nil, render_value = false) super(attrs) @render_value = render_value end |
Instance Method Details
#input_type ⇒ Object
84 85 86 |
# File 'lib/bureaucrat/widgets.rb', line 84 def input_type 'password' end |
#render(name, value, attrs = nil) ⇒ Object
88 89 90 91 |
# File 'lib/bureaucrat/widgets.rb', line 88 def render(name, value, attrs=nil) value = nil unless @render_value super(name, value, attrs) end |