我們剛剛從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