Closed donv closed 9 months ago
We should have test cases for the new method -- I expect a few tests, since this method has optional arguments, and our long list of options. I not proposing we completely re-test
BootstrapForm::FormBuilder
, but maybe consider some of the key use cases for this method and where they might interact with how our form builder works.
I have added a couple of tests to see that it works across the test matrix. The new method actually has no options of itself, it only forwards arguments to the upstream fields_for
method, so I don't see what variants are useful to test. I also added the bootstrap_fields
method since it is trivial to implement.
I'm curious about the
:builder
option. I quickly scanned the Rails docs but didn't see an explicit mention. Did I just miss it?
The concrete option is not mentioned in the method documentation comment. The builder is barely mentioned, but is clearly there in the code:
I'm curious about the
:builder
option. I quickly scanned the Rails docs but didn't see an explicit mention. Did I just miss it?
I found an example here:
Thanks for digging up some details about the builder
argument. Maybe the assumption is that one understands that all those helpers are similar to the form_for
helper that has the builder
argument.
Also, I appreciate you thinking through the testing. I suspected it might be hard to determine what to test, but sometimes I think it's useful to ask people to take one more run at the problem before putting it to bed. Thanks for doing the thinking and researching.
Thanks for digging up some details about the
builder
argument. Maybe the assumption is that one understands that all those helpers are similar to theform_for
helper that has thebuilder
argument.Also, I appreciate you thinking through the testing. I suspected it might be hard to determine what to test, but sometimes I think it's useful to ask people to take one more run at the problem before putting it to bed. Thanks for doing the thinking and researching.
My pleasure! 😄
Fixes #283