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

Allowing Criteria#only to accept an array in addition to being variadic.

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

      While upgrading to Mongoid 3, I noticed a good amount of my app broke because I had an array for Criteria#only. E.g., Band.only([:name, :likes]) instead of it being variadic, Band.only(:name, :likes).

      This pull request allows the function to accept both forms.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jonhyman Jon Hyman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: