Closed ccasabona closed 9 months ago
I cannot find any documentation or examples that use arrays for those arguments. Anybody?
I think what has happened is that check_box_with_bootstrap
now actually uses the horizontal layout while before it did not.
I am trying to find code that supports the label_col
and control_col
options as arrays, but so far I am unable to find such support.
That is interesting as it has always worked in previous versions of the bootstrap_form gem to use the array shortcut in this manner. I would also add that the %w() helper can be used in other rails view helpers such as the tag helper.
On Sep 15, 2023, at 3:31 PM, Uwe Kubosch @.***> wrote:
I think what has happened is that check_box_with_bootstrap now actually uses the horizontal layout while before it did not.
I am trying to find code that supports the label_col and control_col options as arrays, but so far I am unable to find such support.
— Reply to this email directly, view it on GitHub https://github.com/bootstrap-ruby/bootstrap_form/issues/703#issuecomment-1721745548, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQTUIVSLVSEYWHI6C52ZVTX2SUI5ANCNFSM6AAAAAA4Z66VFE. You are receiving this because you authored the thread.
OK, I think I found it. I'll fix it and add some documentation for it.
@ccasabona Could you try version 5.3.2 ?
Version 5.3.2 is working well. Thank you for looking in to this, and for this gem!
On Sep 15, 2023, at 4:38 PM, Uwe Kubosch @.***> wrote:
@ccasabona https://github.com/ccasabona Could you try version 5.3.2 ?
— Reply to this email directly, view it on GitHub https://github.com/bootstrap-ruby/bootstrap_form/issues/703#issuecomment-1721841382, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQTUIWBY2DHE7AM6HTSLPDX2S4FXANCNFSM6AAAAAA4Z66VFE. You are receiving this because you were mentioned.
After upgrading bootstrap_form to version 5.3.1,
bootstrap_form_for
statements that use the ruby %w() array shortcut forlabel_col
andcontrol_col
are causing an ActionView::Template::Error: exception.<%= bootstrap_form_for @charge_refunds, layout: :horizontal, data: { controller: :toggle }, label_col: %w(col-1 col-sm-4 col-md-3), control_col: %w(col-12 col-sm-7 col-md-5) do |f| %>
Here is the output:
This works as expected in v 5.2.3. If you use quotes instead of %w(), it works in 5.3.1.
<%= bootstrap_form_for @charge_refund, layout: :horizontal, data: { controller: :toggle }, label_col: 'col-1 col-sm-4 col-md-3', control_col: 'col-12 col-sm-7 col-md-5' do |f| %>
Rails 7.0.8 Ruby 3.2.2 Bootstrap_form 5.3.1