amerine/acts_as_tree — pull request #24 by dv (2014-05-16 11:24:51+00:00)
Title: Use #empty? method instead of #count == 0

Using #count does not use the counter_cache, but rather triggers a `SELECT COUNT(*)` query to the database.

One, better use `#size` instead of `#count`, so that counter caches are used.

Second, `#empty?` and `#any?` methods will use `#size` as well and are far more expressive.