link to submission preview page in completed emails

This commit is contained in:
Pete Matsyburka
2023-11-20 00:52:05 +02:00
parent d130835902
commit 66d1ae2f64
12 changed files with 114 additions and 34 deletions
+13
View File
@@ -0,0 +1,13 @@
# frozen_string_literal: true
module TimeUtils
module_function
def timezone_abbr(timezone, time = Time.current)
tz_info = TZInfo::Timezone.get(
ActiveSupport::TimeZone::MAPPING[timezone] || timezone || 'UTC'
)
tz_info.abbreviation(time)
end
end