21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-06-21 16:50:58 +02:00
chexpire/app/helpers/checks_helper.rb
2018-06-05 17:36:21 +02:00

15 lines
324 B
Ruby

module ChecksHelper
def check_kind_label(check)
check.kind.upcase
end
def check_row_class(check)
expiry_date = check.domain_expires_at
return unless expiry_date.present?
return "table-danger" if expiry_date <= 2.weeks.from_now
return "table-warning" if expiry_date <= 30.days.from_now
end
end