标签: ruby-on-rails ruby
我希望在datetime_select中禁用所有过去几年,但无法找到任何方法。
答案 0 :(得分:3)
datetime_select("article", "written_on", start_year: Time.now.year)
http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-datetime_select