summaryrefslogtreecommitdiff
path: root/billing/app/helpers/billing_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'billing/app/helpers/billing_helper.rb')
-rw-r--r--billing/app/helpers/billing_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/billing/app/helpers/billing_helper.rb b/billing/app/helpers/billing_helper.rb
new file mode 100644
index 0000000..f91d9c9
--- /dev/null
+++ b/billing/app/helpers/billing_helper.rb
@@ -0,0 +1,12 @@
+module BillingHelper
+
+ def braintree_form_for(object, options = {}, &block)
+ options.reverse_merge! params: @result && @result.params[object],
+ errors: @result && @result.errors.for(object),
+ builder: BraintreeFormHelper::BraintreeFormBuilder,
+ url: Braintree::TransparentRedirect.url
+
+ form_for object, options, &block
+ end
+
+end