0

I am working with a Rails 6.1 project and am using the twitter-bootstrap-rails gem to create a form using bootstrap_form_for for an object that has an association.

I would like to add the association fields to the form, and am finding that Rails has a fields_for, helper but I am not finding any equivalent in twitter-bootstrap-rails.

I was successfully using the fields_forhelper until I needed to create a form_group in it for radio buttons, where the data for the group is coming from an array of hashes.

Although the fields_forhelper does have the ability to create radio button groups, I am not seeing how to use a hash to populate the radio button fields.

How does one add form fields for an object's association, when using the twitter-bootstrap-rails gem maintaining the the full form_group capabilities?

If this isn't possible, can anyone point me to documentation on creating a radio button group under fields_for using an array of hashes as the data source?

Many thanks in advance for your suggestions.

Edward Caulfield
  • 448
  • 5
  • 12
  • If it's nested isn't something along the lines of `bootstrap_form_for @something do |some_thing| ...... some_thing.fields_for do |f|....` – Beartech Jan 13 '23 at 19:05
  • if possible include the relevant form code in the question – Dave Jan 14 '23 at 06:09

0 Answers0