I'm using Devise for authentication and creating an item in a dropdown for Sign Out. This is how I've built it:
<a href="<%= url_for(destroy_user_session_path) %>"><span data-icon="" /> Sign Out</a>
I'm using an icon font to stick a nice little image in to the left of the text. With Devise, it uses the DELETE verb for the destroy_user_session_path
route. Most people would use a button_to or link_to but I don't think this will work for me. Using link_to is going to stick in the closing tag automatically, which won't allow me to put my span tag in. Is there a way for me to build the above link and use the DELETE verb?
For now I'm using the solution in this thread. Specifically changing config.sign_out_via = :delete to config.sign_out_via = :get in devise.rb.