braintree-rails

I would like to add new javascript file to my spree extension

眉间皱痕 提交于 2019-12-25 05:36:07
问题 I am new in rails. I'm trying to build Spree extension to use Braintree's drop-in UI. I'm trying to add new braintree.js to my extension. These are the steps I did so far. Added braintree.js to <my_extension>/app/assets/javascripts/spree/frontend/ Added //= require spree/frontend/braintree to app/assets/javascripts/spree/frontend/<my_extension>.js . Created braintree.rb in <my_extension>/config/initializers/ . Content of this file: Braintree::Configuration.environment = :sandbox Braintree: