【发布时间】:2015-04-19 12:06:32
【问题描述】:
如何按降序显示年份?目前,我有这个:
<%= f.input :year_started, as: :date, label: "Date started", start_year: Date.today.year - 100, end_year: Date.today.year, discard_day: true, order: [:month, :year], include_blank: true, default: nil, :input_html => { :class => 'profile-date' } %>
下拉年份显示如下:
1900
1901
1902
....
2015
我想要相反,你是怎么做到的?:
2015
2014
2013
....
1900
谢谢。
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-4 simple-form