RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: justinthiele
Site: http://twitter.com/justinthiele
For those who aren't using CoffeeScript, here is the compiled subscriptions.js file: https://gist.github.com/1307748
Great episode, btw. I'm loving Stripe so far.
I was having issues getting the add function to work properly in Rails 3 + jQuery too, but this solution from ceneon solved it for me:
--------------
Change the link_to_function to:
link_to_function(name, "add_fields(this, '#{association}', '#{escape_javascript(fields)}')" )
notice the change from \" to ' ... otherwise they would be converted to &, and not a javascript string delimitor.
For those who aren't using CoffeeScript, here is the compiled subscriptions.js file: https://gist.github.com/1307748
Great episode, btw. I'm loving Stripe so far.
I was having issues getting the add function to work properly in Rails 3 + jQuery too, but this solution from ceneon solved it for me:
--------------
Change the link_to_function to:
link_to_function(name, "add_fields(this, '#{association}', '#{escape_javascript(fields)}')" )
notice the change from \" to ' ... otherwise they would be converted to &, and not a javascript string delimitor.