我用下面的date_select助手,但沒有一個按預期工作。 我想要選擇空白選項的日期選擇框。通過以下所有代碼,我可以看到選擇框,但選擇了當前日期。我在軌道2.3.2我希望日期選擇框與空白選項默認選擇
<%= f.date_select :featured_at, :default => {:day => nil, :month => nil, :year => nil} %>
<%#= date_select("post", "featured_at", :prompt => { :day => 'Select day', :month => 'Select month', :year => 'Select year' }) %>
<%#= date_select("post", "featured_at", :default => { :day => nil }) %>
<%#= f.date_select :featured_at, :include_blank => true, :order => [:day, :month, :year] %>