Sha256: a60b2dafd8ab37674d6292654dd28d2d4f9e3082fb9ec7021883b389e04a5367

Contents?: true

Size: 525 Bytes

Versions: 29

Compression:

Stored size: 525 Bytes

Contents

module AdminHelper

  def display_customer_token(account)
    link_to_braintree (account.customer_token || '#'), 'customers', account.customer_token
  end

  def display_subscription_token(account)
    link_to_braintree (account.subscription_token || '#'), 'subscriptions', account.subscription_token
  end

  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

end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
saucy-0.12.2 app/helpers/admin_helper.rb
saucy-0.12.1 app/helpers/admin_helper.rb
saucy-0.12.0 app/helpers/admin_helper.rb
saucy-0.11.5 app/helpers/admin_helper.rb
saucy-0.11.3 app/helpers/admin_helper.rb
saucy-0.11.2 app/helpers/admin_helper.rb
saucy-0.10.7 app/helpers/admin_helper.rb
saucy-0.10.6 app/helpers/admin_helper.rb
saucy-0.10.5 app/helpers/admin_helper.rb