From 6e3a26db7ce4ecf234add7a2ba7bafb7ba9f639a Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 26 Apr 2024 11:27:02 -0400 Subject: [PATCH] Use constant in the filter form --- app/views/filters/_filter_fields.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/filters/_filter_fields.html.haml b/app/views/filters/_filter_fields.html.haml index 5b297a6a9e..0f4049ffb6 100644 --- a/app/views/filters/_filter_fields.html.haml +++ b/app/views/filters/_filter_fields.html.haml @@ -6,7 +6,7 @@ wrapper: :with_label .fields-row__column.fields-row__column-6.fields-group = f.input :expires_in, - collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), + collection: CustomFilter::EXPIRATION_DURATIONS.map(&:to_i), include_blank: I18n.t('invites.expires_in_prompt'), label_method: ->(i) { I18n.t("invites.expires_in.#{i}") }, wrapper: :with_label