Class: Primer::Forms::Builder
- Inherits:
-
ActionView::Helpers::FormBuilder
- Object
- ActionView::Helpers::FormBuilder
- Primer::Forms::Builder
- Defined in:
- app/lib/primer/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
53 54 55 56 57 58 59 60 61 |
# File 'app/lib/primer/forms/builder.rb', line 53 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
49 50 51 |
# File 'app/lib/primer/forms/builder.rb', line 49 def label(method, text = nil, **, &block) super(method, text, classify().merge(generate_error_markup: false), &block) end |
#radio_button(*args, **options, &block) ⇒ Object
63 64 65 |
# File 'app/lib/primer/forms/builder.rb', line 63 def (*args, **, &block) super(*args, classify().merge(generate_error_markup: false), &block) end |
#select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object
67 68 69 |
# File 'app/lib/primer/forms/builder.rb', line 67 def select(method, choices = nil, = {}, = {}, &block) super(method, choices, .merge(generate_error_markup: false), classify(), &block) end |
#text_area(*args, **options, &block) ⇒ Object
79 80 81 |
# File 'app/lib/primer/forms/builder.rb', line 79 def text_area(*args, **, &block) super(*args, classify().merge(generate_error_markup: false), &block) end |
#text_field(*args, **options, &block) ⇒ Object
71 72 73 |
# File 'app/lib/primer/forms/builder.rb', line 71 def text_field(*args, **, &block) super(*args, classify().merge(generate_error_markup: false), &block) end |
#text_field_attributes(method, options = {}) ⇒ Object
75 76 77 |
# File 'app/lib/primer/forms/builder.rb', line 75 def text_field_attributes(method, = {}) Tags::TextField.new(@object_name, method, @template, ).attributes end |