class Article < ActiveRecord::Base def expired? date + 5.hours > Time.now end end