diff options
author | jessib <jessib@riseup.net> | 2013-10-03 12:06:57 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-10-03 12:06:57 -0700 |
commit | e4d422142fb2db2153916bed5826651e8418b7a0 (patch) | |
tree | 2bf960fe71ccae6aa1ff4951ddcce1577f3afdc4 /billing/app/helpers | |
parent | 0fe1678cd37c8e917cb28eed9eb28777d3a92283 (diff) |
Some refactoring of displayed of past-due subscriptions.
Diffstat (limited to 'billing/app/helpers')
-rw-r--r-- | billing/app/helpers/billing_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/billing/app/helpers/billing_helper.rb b/billing/app/helpers/billing_helper.rb index 1dd3f38..68ed5b8 100644 --- a/billing/app/helpers/billing_helper.rb +++ b/billing/app/helpers/billing_helper.rb @@ -46,4 +46,17 @@ module BillingHelper end + def show_set_user_subscriptions(set) + if set.empty? + return t(:none) + else + subscriptions_to_display = '' + set.each do |past_due_subscription| + subscriptions_to_display += render :partial => "subscriptions/subscription_details", :locals => {:subscription => past_due_subscription, :show_user => user_for_subscription(past_due_subscription)} + end + subscriptions_to_display.html_safe + end + end + + end |