any_of doesn't work with variable input

XMLWordPrintableJSON

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

      I don't always know at write time what will go into an any_of query, but I can't do this:
      arr = [{:condition1 => "foo"}, {:condition2 => "bar"}]
      MyClass.any_of(arr)

      1. nor
        MyClass.any_of(*arr)
      1. Expected:
        MyClass.any_of(arr) == MyClass.any_of({:condition1 => "foo"}, {:condition2 => "bar"})
        Suggestions? Or maybe checking for an array arg could be patched in?

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

              Created:
              Updated:
              Resolved: