Follow Along as I Stumble on the Path to Learning RoR

Posts tagged “route

Sign Out Wasn’t Working with Devise for Me

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:

404 Errors

Sometimes you need to route people to 404 errors.

Here’s how to create a method to do this: