title: Rails odd :delete behaviour with twitter-bootstrap-rails
body: <p>I'm having trouble with an odd :delete method behaviour for links. I configured a devise sign_out route, which is linked in a dropdown box. When clicking that link, it leads to a route error (No route matches [GET] "/users/sign_out"). </p>
  
  <p>The strange thing is, that when I copy that link to another position in the navigation bar, it works perfectly. </p>
  
  <p>The RoR navbar code is:</p>
  
  <pre><code>&lt;div class="container nav-collapse"&gt;
  &lt;ul class="nav"&gt;
    &lt;li class="active"&gt;
      &lt;%= link_to t('activeview.navigation.home'), home_index_path %&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;%= link_to t('activeview.navigation.sign_in'), new_user_session_path %&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;%= link_to t('activeview.navigation.sign_up'), new_user_registration_path %&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;%= link_to t('activeview.navigation.sign_out'), destroy_user_session_path, :method =&gt; :delete %&gt;&lt;/li&gt;
    &lt;li class="dropdown"&gt;
      &lt;% if user_signed_in? %&gt;
        &lt;%= link_to (current_user.email + ' &lt;span class="caret"&gt;&lt;/span&gt;').html_safe, '#', {
          :class =&gt; 'dropdown-toggle',
          'data-toggle' =&gt; 'dropdown' } %&gt;
        &lt;ul class="dropdown-menu"&gt;
          &lt;li&gt;&lt;%= link_to t('activeview.navigation.settings'), edit_user_registration_path(current_user) %&gt;&lt;/li&gt;
          &lt;li class="divider"&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= link_to t('activeview.navigation.sign_out'), destroy_user_session_path, :method =&gt; :delete %&gt;&lt;/li&gt;
      &lt;% else %&gt;
        &lt;%= link_to (t('activeview.navigation.not_connected') + ' &lt;span class="caret"&gt;&lt;/span&gt;').html_safe, '#', {
          :class =&gt; 'dropdown-toggle',
          'data-toggle' =&gt; 'dropdown' } %&gt;
      &lt;% end %&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
  </code></pre>
  
  <p>My application.js looks as follows:</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require twitter/bootstrap
  //= require_tree .
  </code></pre>
  
  <p>Below is my navigation bar. The case is that sign_out_1 works perfectly, but sign_out_2 uses the GET method instead of DELETE. </p>
  
  <pre><code>&lt;div class="navbar navbar-fixed-top"&gt;
    &lt;div class="navbar-inner"&gt;
      &lt;div class="container"&gt;
      &lt;a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse"&gt;
      &lt;span class="icon-bar"&gt;&lt;/span&gt;
      &lt;span class="icon-bar"&gt;&lt;/span&gt;
      &lt;span class="icon-bar"&gt;&lt;/span&gt;
      &lt;/a&gt;
      &lt;a class="brand" href="#"&gt;Brand&lt;/a&gt;
      &lt;div class="container nav-collapse"&gt;
      &lt;ul class="nav"&gt;
        &lt;li&gt;&lt;a href="/users/sign_out" data-method="delete" rel="nofollow"&gt;sign_out_1&lt;/a&gt;&lt;/li&gt;
        &lt;li class="dropdown"&gt;
            &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;mail@hotmail.com &lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
            &lt;ul class="dropdown-menu"&gt;
              &lt;li&gt;&lt;a href="/users/edit.2"&gt;Configuración&lt;/a&gt;&lt;/li&gt;
              &lt;li class="divider"&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="/users/sign_out" data-method="delete" rel="nofollow"&gt;sign_out_2&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
      &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My destroy route is:</p>
  
  <pre><code>destroy_user_session     DELETE /users/sign_out(.:format)    devise/sessions#destroy
  </code></pre>
  
  <p>Finally, the .js loading section is: </p>
  
  <pre><code>&lt;script src="/assets/jquery.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/jquery_ujs.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-transition.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-alert.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-modal.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-dropdown.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-scrollspy.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-tab.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-tooltip.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-popover.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-button.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-collapse.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-carousel.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-typeahead.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/twitter/bootstrap/bootstrap-affix.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>