I have a dropdown with US states and territories. I would like to add Canadian provinces so that the entire list is states/provinces in alphabetical order.
Currently I have this code which lists all US states and territories:
= extra_fields.input :province, label: "Franchisee Billing State/Province", input_html: { class: "form-control" } do
= extra_fields.subregion_select(:province, "US", {prompt: 'Please select a state'}, required: 'region required')
I tried converting the second parameter of subregion_select to ["US, "CA"] but that breaks things.
As per my understanding you are looking for union of Canadian provinces and US states for a
select
field withoutcountry_select
functionality. If am i right, you can get by this wayIn rails application
Create helper method
Call the above method in form
I hope this would be helpfull