Below my current code. I want to default to “WI” if it’s a new record.
<%= f.select :state, Address.state_select, :state? ? ‘WI’ : :state %>
This does not work. It gave me the following error:
ctionView::Template::Error (undefined method `merge’ for “WI”:String):
13:
14:
15: <%= f.label :state %>
16: <%= f.select :state, Address.state_select, :state? ? ‘WI’
: :state %>
17:
18:
19: <%= f.label :zip %>