[Rails] [Bug?] in tests, @foo.bars_count <> @foo.bars.count

Rodrigo Alvarez Fernández papipo at gmail.com
Mon Dec 19 00:17:58 GMT 2005


On 12/19/05, Alain Ravet <alainravet-spam2004 at yahoo.com> wrote:
>
> Example: if a 'foo' has  3 'bars',
>
>    bars_count == "0"   # ERROR
>    bars.count == 3     # OK


And what about collection.size and collection_count? Which should be used
and in what case?

It looks like a bug to me.
>
> Alain
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20051219/0c2e04d5/attachment.html


More information about the Rails mailing list