Class: Yattho::Forms::Builder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Includes:
ClassNameHelper
Defined in:
lib/yattho/forms/builder.rb

Overview

:nodoc:

Constant Summary collapse

UTILITY_KEYS =
Yattho::Classify::Utilities::UTILITIES.keys.freeze

Instance Method Summary collapse

Methods included from ClassNameHelper

#class_names

Instance Method Details

#check_box(method, options = {}, checked_value = 1, unchecked_value = 0, &block) ⇒ Object



42
43
44
45
46
47
48
49
50
# File 'lib/yattho/forms/builder.rb', line 42

def check_box(method, options = {}, checked_value = 1, unchecked_value = 0, &block)
  super(
    method,
    classify(options).merge(generate_error_markup: false),
    checked_value,
    unchecked_value,
    &block
  )
end

#label(method, text = nil, **options, &block) ⇒ Object



38
39
40
# File 'lib/yattho/forms/builder.rb', line 38

def label(method, text = nil, **options, &block)
  super(method, text, classify(options).merge(generate_error_markup: false), &block)
end

#radio_button(*args, **options, &block) ⇒ Object



52
53
54
# File 'lib/yattho/forms/builder.rb', line 52

def radio_button(*args, **options, &block)
  super(*args, classify(options).merge(generate_error_markup: false), &block)
end

#select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object



56
57
58
# File 'lib/yattho/forms/builder.rb', line 56

def select(method, choices = nil, options = {}, html_options = {}, &block)
  super(method, choices, options.merge(generate_error_markup: false), classify(html_options), &block)
end

#text_area(*args, **options, &block) ⇒ Object



64
65
66
# File 'lib/yattho/forms/builder.rb', line 64

def text_area(*args, **options, &block)
  super(*args, classify(options).merge(generate_error_markup: false), &block)
end

#text_field(*args, **options, &block) ⇒ Object



60
61
62
# File 'lib/yattho/forms/builder.rb', line 60

def text_field(*args, **options, &block)
  super(*args, classify(options).merge(generate_error_markup: false), &block)
end