Simple filter definition for ActiveRecord & Mongoid.