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

undefined method `session' #395

Open
whoteaches opened this issue Feb 11, 2016 · 0 comments
Open

undefined method `session' #395

whoteaches opened this issue Feb 11, 2016 · 0 comments

Comments

@whoteaches
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant