title: adding a method and html options to link_to in rails?
body: <p>I'm brand new to ruby and rails and I'm having trouble creating a sign-out link (using devise for auth).  I want to pass a custom :method parameter into the link_to function, and set a custom class.  I seem to be able to do one or the other but not both.</p>
  
  <p>When I try: </p>
  
  <pre><code>&lt;%= link_to "Sign out", destroy_user_session_path, :method =&gt; :delete, { :class =&gt; 'signout'}   %&gt;
  </code></pre>
  
  <p>I get the proper result from clicking the link, but I lose my styling.  On the other hand, when I try:</p>
  
  <pre><code>&lt;%= link_to "Sign out", destroy_user_session_path, { :class =&gt; 'signout'}, :method =&gt; :delete %&gt;
  </code></pre>
  
  <p>I get the styling I want but the link request is passed as GET rather than DELETE, resulting in  a routing error.</p>
  
  <p>What am I missing?</p>