Module: AdminHelper
- Defined in:
- app/helpers/admin_helper.rb
Instance Method Summary collapse
- #display_customer_token(account) ⇒ Object
- #display_subscription_token(account) ⇒ Object
- #link_to_braintree(name, resource, id) ⇒ Object
Instance Method Details
#display_customer_token(account) ⇒ Object
3 4 5 |
# File 'app/helpers/admin_helper.rb', line 3 def display_customer_token(account) link_to_braintree (account.customer_token || '#'), 'customers', account.customer_token end |
#display_subscription_token(account) ⇒ Object
7 8 9 |
# File 'app/helpers/admin_helper.rb', line 7 def display_subscription_token(account) link_to_braintree (account.subscription_token || '#'), 'subscriptions', account.subscription_token end |
#link_to_braintree(name, resource, id) ⇒ Object
11 12 13 |
# File 'app/helpers/admin_helper.rb', line 11 def link_to_braintree(name, resource, id) link_to name, "https://#{Rails.env.production? ? 'www' : 'sandbox'}.braintreegateway.com/merchants/#{Braintree::Configuration.merchant_id}/#{resource}/#{id}" end |