Class: BsLabelWithContainerInput

Inherits:
Formtastic::Inputs::StringInput
  • Object
show all
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

Instance Method Details

#to_htmlObject

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
    (:div, class: 'input-group bs_label_with_content') do
      buff = ActiveSupport::SafeBuffer.new
      buff<< (:p, options[:content].call, class: 'form-control-static',id:"#{form_control_input_html_options[:id]}_container")
      buff
    end
  end
end