作者:黑漆高傲的眼眸 | 来源:互联网 | 2024-11-03 17:35
I'm using mongoid as the ORM and have a document with a birthday date field in it.I generate the for
I'm using mongoid as the ORM and have a document with a birthday date field in it.
I generate the form with the below code:
<%= f.input :birthday, :as => :date, :start_year => 1930 %>
the form is working correctly but the value are stored as strings ( birthday(1i),birthday(2i),birthday(3i) ) in the database rather than date format.
该提问来源于开源项目:formtastic/formtastic
Great find, I'm going to add these to the FAQs.