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

XMLWordPrintableJSON

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

      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 (Inactive)
              Reporter:
              Johnny Shields
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: