Topic: Adding blank to country_select

How do I make the select list show an empty blank start when using country_select?

Re: Adding blank to country_select

Use { :include_blank => true }

<%= select_tag 'country', options_for_select(
[TZInfo::Country.all.collect{|x|x.name}, TZInfo::Country.all_codes].transpose.sort, { :include_blank => true }) %>

Re: Adding blank to country_select

This might work.

<%= country_select :my_model, :country, nil, :include_blank => true %>

Untested.

Railscasts - Free Ruby on Rails Screencasts