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

Allow block form in Mongoid::Association::EmbedsMany::Proxy#count

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 7.4.0
    • Affects Version/s: None
    • Component/s: Associations
    • None
    • Fully Compatible

      Mongoid::Association::EmbedsMany::Proxy#count should allow block form to make it congruent with #any?, #none?, #all?, etc.

      Example:
      Person.addresses.count

      {|a| a.country == "FR" }

      I've also added additional tests for other methods #any?#none?#all?
       

      https://github.com/mongodb/mongoid/pull/5000

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: