rails/rails — pull request #4548 by xuanxu (2012-01-19 21:19:08+00:00)
Title: 'none' query method to return empty ActiveRecord::Relation

Here is a method to return an empty relation from a AR model (i.e Post.none).
It is chainable and makes any subsequent relation empty, so Post.none.where(:author_id => 1) is also empty.