desc(:_id) != desc("_id")

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 2.3.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I'm using Integer ids. Strange:

      >> House.desc("_id").first.id
      25583
      >> House.desc(:_id).first.id
      1

      My guess is that the default sort for Mongoid documents is getting correctly overridden in the first case, but not in the second due to the symbol vs string thing. Just a guess.

              Assignee:
              Durran Jordan
              Reporter:
              Adam Doppelt
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: