Rateable不能为空(mongoid-letrate,Mongoid)

时间:2017-12-28 12:52:40

标签: ruby-on-rails ruby mongodb devise

当我尝试创建新User(devise)时,我收到此错误:

Rateable can't be blank(mongoid-letsrate,Mongoid)
Mongoid::Errors::Validations:
   message:
     Validation of User failed.
   summary:
     The following errors were found: Rateable can't be blank
   resolution:
     Try persisting the document with valid data or remove the validations.

我的模特用户:

# User
class User
  include Mongoid::Document
  include Mongoid::Letsrate
   letsrate_rater
end

我的模特书:

# Book
class Book
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Letsrate
  letsrate_rateable
end

0 个答案:

没有答案