Devise’s Sign Out wasn’t working for me. I’ve seen other solutions, but they didn’t worked for me. However, I found an answer that worked for me on Devise’s wiki.
Previously, I used this link:
<%= link_to "Logout", destroy_user_session_path, method: :delete %>
However, that wasn’t working, so I changed (in config/initializers/devise.rb in ):
config.sign_out_via = :delete
config.sign_out_via = :get
and revised the link to (removed “method: :delete”):
<%= link_to "Logout", destroy_user_session_path %>
here are some tutorials on making subdomains work in Rails 3.0
if you want to test this locally, you need to edit your hosts file:
for windows users: http://www.ehow.com/how_5225562_edit-windows-hosts-file.html
Sometimes you need to route people to 404 errors.
Here’s how to create a method to do this: