The country_select and subregion_select methods on
ActionView::Helpers::FormBuilder do not update the options hash with
the :object key, resulting in the value of the object passed into the
form builder not being selected in the HTML output.
Updated FormBuilder methods to add its object to the options hash and
cleaned up the logic for supporting the legacy API for priority
countries.
Add tests for these regressions and update the test suite to pass a
symbol instead of an OpenStruct instance when using the
FormOptionsHelper methods as this is the intended API for these
methods (based on what I can glean from the Rails APIs and code).
The
country_select
andsubregion_select
methods onActionView::Helpers::FormBuilder
do not update theoptions
hash with the:object
key, resulting in the value of the object passed into the form builder not being selected in the HTML output.Updated
FormBuilder
methods to add its object to theoptions
hash and cleaned up the logic for supporting the legacy API for priority countries.Add tests for these regressions and update the test suite to pass a symbol instead of an
OpenStruct
instance when using theFormOptionsHelper
methods as this is the intended API for these methods (based on what I can glean from the Rails APIs and code).