I simply want to set the undefined value for select. By undefined I mean “undefined” one but not only default one.
I have this:
= form_for @address do |f|
= f.select :country_id, [['no country selected','0']] + Country.as_key_value_array
where Country.as_key_value_array returns an array of [['country1','1'], ['country2','3'],['country3','3']]
Is there any other way to reach what I want?
f.select :country_id, "<option value='0'>no country selected</option>".html_safe + options_from_collection_for_select(Country.all, :id, :name)