ruby on rails - collection_radio_buttons does not render values -
ruby on rails - collection_radio_buttons does not render values -
i stuck on form should give me inline grouping of radios. code below:
... <%= f.fields_for :logo |logo_fields| %> <div class="control-group"> <%= logo_fields.label :business, :class => 'control-label' %> <div class="controls"> <%= logo_fields.collection_radio_buttons :business, order.bu, :first, :last |b| %> <%= b.label(class: 'radio inline') { b.radio_button + b.text} %> <% end %> </div> </div> <% end %> ...
i using class method here order.bu
, returns array [[:st, "st"], [:gp, "gp"], [:none, "none of them"]]
used in collection_radio_buttons.
question why above code doesn't create html proper values within fields?
i discovered (when writing question) it's dom doesn't have values in radios. turned out buggy javascript when performing reset operation cleared values of inputs, including radios.
ruby-on-rails forms twitter-bootstrap ruby-on-rails-4 radio-group
Comments
Post a Comment