diff options
Diffstat (limited to 'billing/app/helpers')
-rw-r--r-- | billing/app/helpers/billing_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/billing/app/helpers/billing_helper.rb b/billing/app/helpers/billing_helper.rb index f91d9c9..7ec9285 100644 --- a/billing/app/helpers/billing_helper.rb +++ b/billing/app/helpers/billing_helper.rb @@ -9,4 +9,12 @@ module BillingHelper form_for object, options, &block end + def show_or_new_customer_link(user) + if (customer = Customer.find_by_user_id(user.id)) and customer.has_payment_info? + show_customer_path(user) + else + new_customer_path + end + end + end |