From 7c7f91aabe127770db232737179b322e5e02577c Mon Sep 17 00:00:00 2001 From: Gilles Crofils Date: Tue, 12 Jan 2021 18:21:51 +0100 Subject: [PATCH] Fixed: Append and Prepend This PR removes the div element with class "input-group-*pend" to comply with the specs here https://getbootstrap.com/docs/5.0/forms/input-group/ --- lib/bootstrap_form/helpers/bootstrap.rb | 2 +- test/bootstrap_form_group_test.rb | 24 ++++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/lib/bootstrap_form/helpers/bootstrap.rb b/lib/bootstrap_form/helpers/bootstrap.rb index 3e5554632..9cb1a8f95 100644 --- a/lib/bootstrap_form/helpers/bootstrap.rb +++ b/lib/bootstrap_form/helpers/bootstrap.rb @@ -108,7 +108,7 @@ def static_class def attach_input(options, key) tags = [*options[key]].map do |item| - tag.div(input_group_content(item), class: "input-group-#{key}") + input_group_content(item) end ActiveSupport::SafeBuffer.new(tags.join) end diff --git a/test/bootstrap_form_group_test.rb b/test/bootstrap_form_group_test.rb index 4e1f23cf6..202e47da0 100644 --- a/test/bootstrap_form_group_test.rb +++ b/test/bootstrap_form_group_test.rb @@ -121,9 +121,7 @@ class BootstrapFormGroupTest < ActionView::TestCase
-
- @ -
+ @
@@ -137,9 +135,7 @@ class BootstrapFormGroupTest < ActionView::TestCase
-
- .00 -
+ .00
HTML @@ -168,13 +164,9 @@ class BootstrapFormGroupTest < ActionView::TestCase
-
- $
-
+ $
-
- .00 -
+ .00 HTML @@ -191,13 +183,9 @@ class BootstrapFormGroupTest < ActionView::TestCase
-
- $
-
+ $
-
- .00 -
+ .00
can't be blank, is too short (minimum is 5 characters)