1 2 3 4 5 6
class LicenseStatus::Expired def filter(licenses) today = DateTime.now licenses.where('expired_at < ?', today) end end