Implement eq symbol operator

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 7.4.0
    • Affects Version/s: None
    • Component/s: Query
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Mongoid appears to implement all comparison operators as methods on symbols except eq:

      (byebug) MyModel.any_of(:field.ne => 'x')
      #<Mongoid::Criteria
        selector: {"field"=>{"$ne"=>"x"}}
        options:  {}
        class:    MyModel
        embedded: false>
      (byebug) MyModel.any_of(:field.eq => 'x')
      *** NoMethodError Exception: undefined method `eq' for :field:Symbol
      
      

              Assignee:
              Dmitry Rybakov
              Reporter:
              Oleg Pudeyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: