Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4177

undefined method `with_default_scope' for {}:Hash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:
      None
    • Environment:
      mongoid#HEAD ref #54fe58f8

      Description

      Tried mongoid HEAD, getting this (didn't debug yet):

       

      NoMethodError:
      undefined method `with_default_scope' for {}:Hash

      1. /Users/dblock/.rvm/gems/ruby-2.0.0-p643/bundler/gems/mongoid-54fe58f87faf/lib/mongoid/scopable.rb:209:in `with_default_scope'
      2. (eval):2:in `where'
      3. ./app/models/domain/artwork.rb:202:in `block in <class:Artwork>'
      4. /Users/dblock/.rvm/gems/ruby-2.0.0-p643/bundler/gems/mongoid-54fe58f87faf/lib/mongoid/scopable.rb:316:in `instance_exec'
      5. /Users/dblock/.rvm/gems/ruby-2.0.0-p643/bundler/gems/mongoid-54fe58f87faf/lib/mongoid/scopable.rb:316:in `block (2 levels) in define_scope_method'
      6. /Users/dblock/.rvm/gems/ruby-2.0.0-p643/bundler/gems/mongoid-54fe58f87faf/lib/mongoid/criteria.rb:551:in `block in method_missing'
      7. /Users/dblock/.rvm/gems/ruby-2.0.0-p643/bundler/gems/mongoid-54fe58f87faf/lib/mongoid/scopable.rb:227:in `with_scope'
      8. /Users/dblock/.rvm/gems/ruby-2.0.0-p643/bundler/gems/mongoid-54fe58f87faf/lib/mongoid/criteria.rb:550:in `method_missing' {/code}

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: