Open indranil-m opened 10 years ago
I spent about three hours trying a whole slew of things here. I expected that the documented approach would work, namely:
<%= subregion_select( @MODEL_NAME, :NAME_OF_ATTRIBUTE_IN_MODEL, parent_region, :class => 'form-control' ) %>
Yet, this did not work very well.
Eventually, I found one approach that worked where two hashes are included in the call to subregion_select (one empty, the other specifying the bootstrap class for the dropdown styling).
<%= subregion_select( @MODEL_NAME, :NAME_OF_ATTRIBUTE_IN_MODEL, parent_region, {}, { :class => 'form-control' } ) %>
We couldn't pass class names in subregion_select helper;
tried below samples:
subregion_select(:shipping_address, :state_id, parent_region, :html_options => {:class => 'form-control'}) AND subregion_select(:billing_address, :state_id, parent_region, class: 'form-control')