How do I write a select_year backwards from today's year?
I understand there is a select_Year but i can't figure out how to use it:
开发者_如何学Go= f.select_year("dob", :start_year => DateTime.now.year, :end_year => DateTime.now.year - 100 )
This is incorrect..how would you actually write this? My attribute is :dob
= f.select_year(Date.today, :start_year => DateTime.now.year, :end_year => DateTime.now.year - 100, :field_name => 'dob' )
EDIT
next one works
select_year(Date.today, {:start_year => DateTime.now.year, :end_year => DateTime.now.year - 100}, {:name => 'card_signup[dob]'})
精彩评论