I am using Stripe to let users subscribe to my Rails 3.2 application. I have a Subscription model, and in the JS asset I call the Stripe
object. But I only include the Stripe javascript file in a special layout file for the Subscription process. It's not included in my main Application layout.
So of course I get an error if I don't also include the Stripe JS file on the main Application layout template, because subscription.js.coffee is referencing Stripe.
Is there a way to NOT load the subscription asset except from the special Subscription template I've set up?