我们刚刚从rails ActiveRecord迁移到mongoid。我们认为,我们可以使用助手Rails 4&Mongoid:日期助手
<%= f.date_select :date, :use_two_digit_numbers => true, :order => [:day, :month, :year], class: "form-control" %>
但是它不与mongoid工作,因为它正在发送参数
date(3i)"=>"21", "date(2i)"=>"9", "date(1i)"=>"2014"
和Rails抛出
Mongoid::Errors::UnknownAttribute
Problem: Attempted to set a value for 'date(3i)' which is not allowed on the model
This question提到mongoid不能这样做,而不包括一个模块。但显然我的导轨应用程序不识别模块?
uninitialized constant Mongoid::MultiParameterAttributes