Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

undefined method `session' #395

Description

@whoteaches

I have no idea what's going on here. I upgraded to MOPED 2.0.7 and I'm getting an undefined method `session' error

I'm using mongoid_taggable to create a MOPED collection:

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

Then according to your documentation, I should be able to do:
User.tags_index_collection.find.entries

.find works, but as soon as I add .entries, I get :

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'

Any idea why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions