Ruby on rails + Braintree -> submit button not starting the create action

73 views Asked by At

I've implemented Braintree gem (with this help: http://www.sitepoint.com/integrate-braintree-payments-rails/).

In my view I have the "dropin" code:

  <div class="form-container radius-box glassy-bg small-10 small-centered medium-8 large-6 columns">
      <%= form_tag transactions_path do%>
        <p>Please enter your payment details:</p>
        <div id="dropin"></div>

      <%end%>
  </div>

When I remove it, object is being saved. But with this code, the submit button does not do anything. It's very hard to debug - there are no outputs at all ("create" action is not being started).

1

There are 1 answers

0
Wil On

you need to have a submit button for any form to work.

Add this on your form.

<button type="submit" name="action">Submit Form</button>