Module: ExtForm::Components::InputAddons

Extended by:
ActiveSupport::Concern
Defined in:
lib/ext_form/components/input_addons.rb

Instance Method Summary collapse

Instance Method Details

#input_addonObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/ext_form/components/input_addons.rb', line 6

def input_addon
  template.(addon_options[:tag]||'span', nil, input_addon_html_options) do
    output = []
    output << input_addon_image if addon_options[:icon] || addon_options[:datetimepicker]
    output << input_addon_text

    output.reverse! if addon_options[:text_first]
    output.compact.join.html_safe
  end
end