Class: Ariadne::Forms::Builder
- Inherits:
-
ActionView::Helpers::FormBuilder
- Object
- ActionView::Helpers::FormBuilder
- Ariadne::Forms::Builder
- Defined in:
- lib/ariadne/forms/builder.rb
Overview
:nodoc:
Instance Method Summary collapse
- #check_box(method, options = {}, checked_value = 1, unchecked_value = 0, &block) ⇒ Object
- #label(method, text = nil, **options, &block) ⇒ Object
- #radio_button(*args, **options, &block) ⇒ Object
- #select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object
- #text_area(*args, **options, &block) ⇒ Object
- #text_field(*args, **options, &block) ⇒ Object
- #text_field_attributes(method, options = {}) ⇒ Object
Instance Method Details
#check_box(method, options = {}, checked_value = 1, unchecked_value = 0, &block) ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/ariadne/forms/builder.rb', line 51 def check_box(method, = {}, checked_value = 1, unchecked_value = 0, &block) super( method, classify().merge(generate_error_markup: false), checked_value, unchecked_value, &block ) end |
#label(method, text = nil, **options, &block) ⇒ Object
47 48 49 |
# File 'lib/ariadne/forms/builder.rb', line 47 def label(method, text = nil, **, &block) super(method, text, classify().merge(generate_error_markup: false), &block) end |
#radio_button(*args, **options, &block) ⇒ Object
61 62 63 |
# File 'lib/ariadne/forms/builder.rb', line 61 def (*args, **, &block) super(*args, classify().merge(generate_error_markup: false), &block) end |
#select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object
65 66 67 |
# File 'lib/ariadne/forms/builder.rb', line 65 def select(method, choices = nil, = {}, = {}, &block) super(method, choices, .merge(generate_error_markup: false), classify(), &block) end |
#text_area(*args, **options, &block) ⇒ Object
77 78 79 |
# File 'lib/ariadne/forms/builder.rb', line 77 def text_area(*args, **, &block) super(*args, classify().merge(generate_error_markup: false), &block) end |
#text_field(*args, **options, &block) ⇒ Object
69 70 71 |
# File 'lib/ariadne/forms/builder.rb', line 69 def text_field(*args, **, &block) super(*args, classify().merge(generate_error_markup: false), &block) end |
#text_field_attributes(method, options = {}) ⇒ Object
73 74 75 |
# File 'lib/ariadne/forms/builder.rb', line 73 def text_field_attributes(method, = {}) Tags::TextField.new(@object_name, method, @template, ).attributes end |