Class: Forme::InputsWrapper::Bootstrap3
- Inherits:
-
Object
- Object
- Forme::InputsWrapper::Bootstrap3
- Defined in:
- lib/forme/bs3.rb
Overview
Use a <fieldset> tag to wrap the inputs.
Registered as :bs3.
Instance Method Summary collapse
Instance Method Details
#call(form, opts, &block) ⇒ Object
208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/forme/bs3.rb', line 208 def call(form, opts, &block) attr = opts[:attr] ? opts[:attr].dup : {} Forme.attr_classes(attr, 'inputs') if legend = opts[:legend] form.tag(:fieldset, attr) do form.emit(form.tag(:legend, opts[:legend_attr], legend)) yield end else form.tag(:fieldset, attr, &Proc.new) end end |