title: Rails 4 No route matches [POST] "/transactions/new"
body: <p>I'm trying to follow this <a href="http://www.sitepoint.com/integrate-braintree-payments-rails/" rel="nofollow">tutorial</a>, but I'm getting this error message on form submission:</p>
  
  <pre><code>No route matches [POST] "/transactions/new"
  </code></pre>
  
  <p>routes.rb</p>
  
  <pre><code>resources :transactions, only: [:new, :create]
  </code></pre>
  
  <p>transactions#new view</p>
  
  <pre><code>&lt;%= form_tag transactions_path do%&gt;
     &lt;%= fields....%&gt;  
  &lt;%=submit_tag "Pay #{@course.price}$", :class=&gt;"btn" %&gt;
  </code></pre>
  
  <p>When I rake routes</p>
  
  <pre><code>transactions_path   POST    /transactions(.:format) transactions#create
  new_transaction_path    GET /transactions/new(.:format) transactions#new
  create_transaction_path POST    /transactions(.:format) transactions#new
  </code></pre>
  
  <p>The controller</p>
  
  <pre><code>def new
    @client_token = generate_client_token
    @course = Course.find(params[:course_id])      
  end
  </code></pre>
  
  <p>Here's the full trace:</p>
  
  <pre><code>Routing Error
  No route matches [POST] "/transactions/new"
  
  Rails.root: C:/Sites/christian
  
  Application Trace | Framework Trace | Full Trace
  actionpack (4.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.5) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.5) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.5) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
  actionpack (4.2.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.5) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/static.rb:116:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  railties (4.2.5) lib/rails/engine.rb:518:in `call'
  railties (4.2.5) lib/rails/application.rb:165:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
  </code></pre>