I am using carmen-rails for state dropdown. The state drop down dynamically updates when country is updated but on edit page, the state drop down is not defaulting to the saved state value. Can anyone help?
FYI - I am passing the saved state value as locals parameter u
<div id="order_state_code_wrapper">
<% parent_region ||= params[:parent_region] %>
<% if parent_region.nil? %>
<em>Please select a country above</em>
<% else %>
<% country = Carmen::Country.coded(parent_region) %>
<% if country.nil? %>
<em>Please select a country above</em>
<% elsif country.subregions? %>
<%= subregion_select(:user, :subregion_iso2, parent_region) %>
<% else %>
<%= text_field(:user, :subregion_iso2) %>
<% end %>
<% end %>
</div>