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

Regex queries should be possible against field type Symbol

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 9.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      This works in Ruby:

      :foobar.match?(/foo/)  #=> true
      

      So this should work in Mongoid

      class Pet
        field :animal, type: Symbol
      end
      
      Pet.where(animal: /fish/)
      

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: