title: Log out path is incorrectly called on Heroku in Ruby on Rails
body: <p>I have a problem with a Rails app deployed on Heroku.</p>
  
  <p>I have this link in the <strong>_header.html.erb</strong> file:</p>
  
  <pre><code>...
  &lt;li&gt;&lt;%= link_to "Log out", logout_path, method: :delete %&gt;&lt;/li&gt;
  ...
  </code></pre>
  
  <p>My logout_path is this one when typing <code>rails routes</code>:</p>
  
  <pre><code>logout    DELETE      /logout(.:format)           sessions#destroy
  </code></pre>
  
  <p>Now it works just right on local, but on Heroku it just doesnt. The problem is that on Heroku it tries to infer a GET on the logout path:</p>
  
  <p><strong>Heroku logs:</strong></p>
  
  <pre><code>2018-08-17T16:34:16.490731+00:00 app[web.1]: (...) Started GET "/logout" for 84.147.254.28 at 2018-08-17 16:34:16 +0000
  2018-08-17T16:34:16.491804+00:00 app[web.1]: (...) ActionController::RoutingError (No route matches [GET] "/logout"):
  2018-08-17T16:34:16.492143+00:00 app[web.1]: (...) vendor/bundle/ruby/2.4.0/gems/actionpack-5.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
  </code></pre>
  
  <p><strong>Local logs:</strong></p>
  
  <pre><code>Started DELETE "/logout" for 127.0.0.1 at 2018-08-17 18:44:51 +0200
  </code></pre>
  
  <p>Can someone help me with this, I dont know why it does that allthough I seemingly did everything like it should be done.</p>
  
  <p>Thank you,</p>
  
  <p>Jaiel</p>
  
  <p>EDIT:</p>
  
  <p>my <strong>application.js</strong></p>
  
  <pre><code>//= require jquery
  //= require bootstrap
  //= require rails-ujs
  //= require turbolinks
  //= require_tree .
  </code></pre>