0
私は今年から2015年まで、今年までは2015年から2015年に変更された年のリストを作成する必要があります。現在の年を取得する方法select_tag
<%= select_tag "leave_emp_year", options_for_select(Date.today, :start_year => Date.today.year, :end_year => 8.years.from_now.years), prompt: "Select Year", class: "leave_emp_sort_filter",style: "width:150px !important;" %>
以前私はこの
<%= select_tag "leave_emp_year", options_for_select([[2016, 2016], [2017, 2017]]), prompt: "Select Year", class: "leave_emp_sort_filter",style: "width:150px !important;" %>