diff options
author | azul <azul@leap.se> | 2015-10-19 11:19:43 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2015-10-19 11:19:43 +0200 |
commit | 04302654c223dba1c9a06922afaa7462966ea122 (patch) | |
tree | edd493015ce03bb1fb80cc61aa3076fdf8fc467f /engines/billing/app/helpers/billing_helper.rb | |
parent | c2cc1a48a4faeff4088cdf5f56e6b0382acfb346 (diff) | |
parent | 8abadb0fe7618e978d9d297ce62fb6c0228c7191 (diff) |
Merge pull request #198 from claucece/develop
Braintree_implementation
Diffstat (limited to 'engines/billing/app/helpers/billing_helper.rb')
-rw-r--r-- | engines/billing/app/helpers/billing_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/billing/app/helpers/billing_helper.rb b/engines/billing/app/helpers/billing_helper.rb index b9e5e2e..6d1df5a 100644 --- a/engines/billing/app/helpers/billing_helper.rb +++ b/engines/billing/app/helpers/billing_helper.rb @@ -1,5 +1,6 @@ module BillingHelper + #deprecated.. erase? def braintree_form_for(object, options = {}, &block) options.reverse_merge! params: @result && @result.params[object], errors: @result && @result.errors.for(object), @@ -14,10 +15,11 @@ module BillingHelper if (admin? and user == current_user) billing_admin_path else - show_or_new_customer_link(user) + subscriptions_path end end + #deprecated.. erase? def show_or_new_customer_link(user) # Link to show if user is admin viewing another user, or user is already a customer. # Otherwise link to create a new customer. @@ -28,6 +30,7 @@ module BillingHelper end end + #deprecated.. erase? # a bit strange to put here, but we don't have a subscription model def user_for_subscription(subscription) @@ -44,6 +47,7 @@ module BillingHelper end + #customer needs to see active or pending? def allow_cancel_subscription(subscription) ['Active', 'Pending'].include? subscription.status or (admin? and subscription.status == 'Past Due') end |