21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-06-26 19:12:53 +02:00
chexpire/app/helpers/checks_helper.rb

15 lines
324 B
Ruby
Raw Normal View History

2018-05-29 10:28:03 +02:00
module ChecksHelper
2018-06-05 17:27:12 +02:00
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
2018-05-29 10:28:03 +02:00
end