Created
July 14, 2020 18:24
-
-
Save ghiculescu/91783693614f866c2ccf8c8a86f07cc5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def display_expected_hours_in_pay_period(user) | |
freq = user.next_pay_group.typed_frequency | |
case freq | |
when Frequency::Weekly | |
t("periods.week").downcase | |
when Frequency::Fortnightly | |
t("periods.fortnight").downcase | |
when Frequency::SemiMonthly | |
t("periods.period").downcase | |
when Frequency::Monthly | |
t("periods.month").downcase | |
else | |
T.absurd(freq) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment