Using ActiveRecord the standard way:
MyModel.where("created_at < ?", 2.days.ago)
Using the underlying Arel interface:
MyModel.where(MyModel.arel_table[:created_at].lt(2.days.ago))
Using some thin layer over Arel:
MyModel.where(MyModel[:created_at] < 2.days.ago)
Using squeel:
MyModel.where { created_at < 2.days.ago }
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…