轻便摩托车2.0.7未定义方法`session'

时间:2016-02-11 16:38:35

标签: mongodb mongoid moped

我不知道这里发生了什么。 我升级到MOPED 2.0.7并且我得到了这个未定义的方法`session'为#

User.tags_index_collection
 => #<Moped::Collection:0x007fa744fe2c50 @database=#<Mongo::Database:0x70178196887520 name=my_mongo_development>, @name="users_tags_index"> 

然后根据他们的文件here,我应该能够做到:

User.tags_index_collection.find.entries

但是当我这样做时,我得到了

NoMethodError: undefined method `session' for #<Mongo::Database:0x007fa744fe2fc0>
    from /Users/me/.rvm/gems/ruby-2.3.0/gems/moped-2.0.7/lib/moped/query.rb:501:in `session'
    from /Users/me/.rvm/gems/ruby-2.3.0/gems/moped-2.0.7/lib/moped/query.rb:93:in `cursor'
    from /Users/me/.rvm/gems/ruby-2.3.0/gems/moped-2.0.7/lib/moped/query.rb:78:in `each'
    from (irb):8:in `entries'

有什么想法吗?

0 个答案:

没有答案