Move currency helper to existing subscriptions helpers file
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
module SubscriptionsHelper
|
||||
def currency(amount)
|
||||
number_to_currency(amount, precision: (amount % 1).zero? ? 0 : 2)
|
||||
end
|
||||
end
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user