Probably because it's one of things where the differences are very
subtle. Therefore, no answer is probably a good thing -- I think it
means most people are thinking "it doesn't affect me, but it might
affect somebody, so I can't give an authoritative answer one way or another"
http://blog.hasmanythrough.com/2008/2/27/count-length-size
"size" is the most efficient option, and would usually be the right
function.
Bryan
On 10-05-20 11:20 AM, Tiago Franco wrote:
Hi,
Are there any thoughts on this improvement suggestions? Probably I
wasn't clear?
Thanks,
TF
On May 17, 7:41 pm, Tiago Franco<[email protected]> wrote:
Hi,
I'm currently adding the counter_cache gem to a project. I've realized
that the<count> tag calls the methods "length" and "count". These
methods allways query the database.
IMHO, the "count" tag should call "size" instead of lenght and count,
in order to take advantage of counter_cache's counter.
Regards,
TF
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group
athttp://groups.google.com/group/hobousers?hl=en.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.