Class: Furatto::FormBuilder
- Inherits:
-
ActionView::Helpers::FormBuilder
- Object
- ActionView::Helpers::FormBuilder
- Furatto::FormBuilder
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- lib/furatto_rails_helpers/form_builder.rb
Instance Method Summary collapse
- #label(attribute, text = nil, options = {}) ⇒ Object
- #password_field(attribute, options = {}) ⇒ Object
Instance Method Details
#label(attribute, text = nil, options = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/furatto_rails_helpers/form_builder.rb', line 19 def label(attribute, text = nil, = {}) [:class] ||= "" [:class] += " error" if has_error?(attribute) super(attribute, (text || "").html_safe, ) end |
#password_field(attribute, options = {}) ⇒ Object
25 26 27 28 29 |
# File 'lib/furatto_rails_helpers/form_builder.rb', line 25 def password_field(attribute, = {}) field attribute, do || super(attribute, .merge(:autocomplete => :off)) end end |