Class: SimpleForm::Wrappers::Single
- Defined in:
- lib/simple_form/wrappers/single.rb
Overview
‘Single` is an optimization for a wrapper that has only one component.
Instance Attribute Summary
Attributes inherited from Many
#components, #defaults, #namespace
Instance Method Summary collapse
-
#initialize(name, wrapper_options = {}, options = {}) ⇒ Single
constructor
A new instance of Single.
- #render(input) ⇒ Object
Methods inherited from Many
Constructor Details
Instance Method Details
#render(input) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/simple_form/wrappers/single.rb', line 12 def render(input) = input. if [namespace] != false content = @component.render(input) wrap(input, , content) if content end end |