0

我正在使用 rails 4 形式的日期助手。

= date_select :press_article, :date

我的模型:

class PressArticle
  include Mongoid::Document
  include Mongoid::MultiParameterAttributes
  field :title, type: String
  field :excerpt, type: String
  field :body, type: String
  field :date, type: Date
  field :press_name, type: String
  field :press_logo, type: String
  field :article_image, type: String
  field :article_url, type: String
end

但是,当我尝试保存新的 press_article 时,出现以下错误:

uninitialized constant Mongoid::MultiParameterAttributes

帮助任何人?

4

1 回答 1

0

Mongoid::MultiParameterAttributes已从 Mongoid 中删除,而 Rails 4 的所有内容目前都悬而未决。

https://github.com/rails/rails/pull/8189

于 2015-05-22T19:25:44.210 回答