From e4d422142fb2db2153916bed5826651e8418b7a0 Mon Sep 17 00:00:00 2001 From: jessib Date: Thu, 3 Oct 2013 12:06:57 -0700 Subject: Some refactoring of displayed of past-due subscriptions. --- billing/app/helpers/billing_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'billing/app/helpers/billing_helper.rb') 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 -- cgit v1.2.3