Post.all returns a Mongoid::Criteria rather than a result set

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Docs
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the Rails Console, calling Post.all with Active Record returns an arrray of blog posts. With Mongoid, Post.all returns a Mongoid::Criteria object instead. You must call Post.all.to_a to execute the query and iterate the results. We should call out the need for to_a (or similar method) clearly in our documentation.

              Assignee:
              Dmitry Rybakov
              Reporter:
              James Kovacs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: