diff --git a/lib/bootstrap_form/helpers/bootstrap.rb b/lib/bootstrap_form/helpers/bootstrap.rb index d157dc2d5..56839ef19 100644 --- a/lib/bootstrap_form/helpers/bootstrap.rb +++ b/lib/bootstrap_form/helpers/bootstrap.rb @@ -68,7 +68,7 @@ def prepend_and_append_input(name, options, &block) input = attach_input(options, :prepend) + input + attach_input(options, :append) input << generate_error(name) options.present? && - input = tag.div(input, class: ["input-group", options[:input_group_class]].compact) + (input = tag.div(input, class: ["input-group", options[:input_group_class]].compact)) input end @@ -78,7 +78,7 @@ def input_with_error(name, &block) end def input_group_content(content) - return content if content.include?("btn") + return content if content.strip.start_with?("<") tag.span(content, class: "input-group-text") end