app/helpers/binco/bootstrap_form_builder.rb in binco-3.1.4 vs app/helpers/binco/bootstrap_form_builder.rb in binco-3.1.5

- old
+ new

@@ -159,11 +159,20 @@ options = add_class_to_options('input-group', options) group_tag options, &block end def addon(icon, options = {}) - options = add_class_to_options('input-group-addon', options) - @template.content_tag(:span, icon, options) + input_group_append(icon, options) + end + + def input_group_prepend(content, options = {}) + options = add_class_to_options('input-group-prepend', options) + @template.content_tag(:div, @template.content_tag(:span, content, { class: 'input-group-text' }), options) + end + + def input_group_append(content, options = {}) + options = add_class_to_options('input-group-append', options) + @template.content_tag(:div, @template.content_tag(:span, content, { class: 'input-group-text' }), options) end private # Add the specified class_name the the options hash