#max and #min returns "start" when field is nil

XMLWordPrintableJSON

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

       
      class Foo
        include Mongoid::Document
        field :position, type: Integer
      end
      
      Foo.create!
      Foo.max(:position)   # => "start"
      Foo.min(:position)   # => "start"
      Foo.max(:whatever)   # => "start"
      

      Shouldn't #max and #min return nil or 0 instead?

              Assignee:
              Unassigned
              Reporter:
              gudleik
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: