Module: BulmaFormBuilder::FormField

Extended by:
ActiveSupport::Concern
Included in:
FormBuilder
Defined in:
lib/bulma_form_builder/form_field.rb

Instance Method Summary collapse

Instance Method Details

#form_field(*args, &block) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/bulma_form_builder/form_field.rb', line 5

def form_field(*args, &block)
  name = args.first
  options = args.extract_options!

  (:div, class: form_field_classes(options)) do
    concat field_label(name, options) unless options[:hide_label]
    concat field_control(&block)
    concat field_help(name, options)
  end
end