rails/rails — pull request #9280 by calebthompson (2013-02-14 05:18:13+00:00)
Title: Add has_#{association.pluralize}?

* Add has_assocations? reader method to collection assocations.

For example, if Author has_many Posts, ActiveRecord::Associations will
provide Author#has_posts?, which returns true if the posts association
has at least one record and false otherwise.