Class: BsLabelWithContainerInput
- Inherits:
-
Formtastic::Inputs::StringInput
- Object
- Formtastic::Inputs::StringInput
- BsLabelWithContainerInput
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper, FormtasticBootstrap::Inputs::Base, FormtasticBootstrap::Inputs::Base::Collections
- Defined in:
- app/input/bs_label_with_container_input.rb
Instance Method Summary collapse
-
#to_html ⇒ Object
Passare nelle opzioni la chiave :content con una proc che richiamo per generare il buffer.
Instance Method Details
#to_html ⇒ Object
Passare nelle opzioni la chiave :content con una proc che richiamo per generare il buffer
11 12 13 14 15 16 17 18 19 20 |
# File 'app/input/bs_label_with_container_input.rb', line 11 def to_html bootstrap_wrapping do content_tag(:div, class: 'input-group bs_label_with_content') do buff = ActiveSupport::SafeBuffer.new buff<< content_tag(:p, [:content].call, class: 'form-control-static',id:"#{[:id]}_container") buff end end end |