Help me please to solve problem with collection_select. When I use:
collection_select(:service, :carmake_id, Carmake.all, :id, :name, include_blank: 'Any')
HTML is:
<select id="service_carmake_id" name="service[carmake_id]">
<option value="">Any</option>
<option value="12">Audi</option>
<option value="16">Porsche</option>
<option value="17">VW</option>
</select>
But I need value="0" for "Any" option. Is it possible?
Update:
select(:service, :carmake_id, [['Any', 0]] + Carmake.all.collect { |p| [p.name, p.id]})
helped me, but there is railsway? Or I misunderstand something?