Move currency helper to existing subscriptions helpers file

This commit is contained in:
Andy Smith
2025-12-19 15:47:04 -06:00
parent 43b67e92ad
commit 1f16936b2e
2 changed files with 4 additions and 5 deletions
-5
View File
@@ -1,5 +0,0 @@
module SubscriptionsHelper
def currency(amount)
number_to_currency(amount, precision: (amount % 1).zero? ? 0 : 2)
end
end
+4
View File
@@ -12,4 +12,8 @@ module SubscriptionsHelper
"Your next payment is <b>#{ currency(subscription.next_amount_due) }</b> on".html_safe
end
end
def currency(amount)
number_to_currency(amount, precision: (amount % 1).zero? ? 0 : 2)
end
end