#1384 confirmed
Alex

count method included in resource without dm-aggregates

Reported by Alex | August 10th, 2010 @ 12:09 PM

It's confusing that the count method is included on a resource without dm-aggregates being included. What's more confusing is it appears to return the proper count when no query hash is specified but otherwise will always return 0.

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) August 10th, 2010 @ 12:24 PM

    • State changed from “new” to “confirmed”

    I think #count is coming from Enumerable in 1.8.7+, but to avoid confusion we should probably use undef_method :count in Model and Collection.

    We should probably also look at doing the same for :min, :max and other methods that are provided by dm-aggregates. I would've wished that we didn't have knowledge of which dm-aggregates' methods are in dm-core, since I think that screws up the dependency chain, but I don't know if we can get around it.

  • Piotr Solnica (solnic)

    Piotr Solnica (solnic) May 17th, 2011 @ 02:26 AM

    • Tag set to dm-aggregates

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Pages