Class: Bureaucrat::Widgets::PasswordInput

Inherits:
Input
  • Object
show all
Defined in:
lib/bureaucrat/widgets.rb

Constant Summary

Constants included from Utils

Utils::ESCAPES

Instance Attribute Summary

Attributes inherited from Widget

#attrs

Instance Method Summary collapse

Methods inherited from Input

inherited

Methods inherited from Widget

#build_attrs, #has_changed?, #hidden?, id_for_label, inherited, #initialize_copy, #media, #value_from_datahash

Methods included from Utils

conditional_escape, escape, flatatt, format_string, make_bool, make_float, mark_safe, pretty_name, security_hash

Constructor Details

#initialize(attrs = nil, render_value = true) ⇒ PasswordInput

Returns a new instance of PasswordInput.



189
190
191
192
# File 'lib/bureaucrat/widgets.rb', line 189

def initialize(attrs=nil, render_value=true)
  super(attrs)
  @render_value = render_value
end

Instance Method Details

#render(name, value, attrs = nil) ⇒ Object



194
195
196
197
# File 'lib/bureaucrat/widgets.rb', line 194

def render(name, value, attrs=nil)
  value = nil unless @render_value
  super(name, value, attrs)
end