Ordering behavior for ActiveRecord models and Mongoid documents.