Ruby on Rails
Tuesday, June 9, 2015
I have been pretty frustrated with the inconsistencies of AR's #count method. In my humble opinion, the count method should always return an integer. The "grouped count" functionality is powerful but should not be lumped in with the main #count method. This is further seen by the inconsistency on the #size method where in the result is either the result of #count if unloaded or #length of the results when loaded. I plan as proposing this as a PR, but thought to first start it as a discussion in the google group. Please share your opinions on my proposal.
-- Cheers,
Jason Waldrip
CTO @ Brandfolder.com
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/122c51de-2854-4a4d-b6bd-1a435f6795b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment