Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6231787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:59:44+00:00 2026-05-24T09:59:44+00:00

the problem: In a nutshell, when I try to install a logout link to

  • 0

the problem: In a nutshell, when I try to install a logout link to my app it fails to work. Here’s as much context as I can think to put here (if you want anything else, please poke me)…

I’ve got this in a haml view:

= link_to("Logout", destroy_user_session_path, :method => :delete)

It generates this in the view:

<a href="/users/sign_out" data-method="delete" rel="nofollow">Logout</a>

I verified that in my config/initializers/devise.rb I have this setting uncommented and correct:

config.sign_out_via = :delete

I validated the following route:

destroy_user_session DELETE /users/sign_out(.:format) {:action=>"destroy", :controller=>"devise/sessions"}

I also have this bit of trickery in my routes.rb, and I suspect this is related to my issue:

devise_for :users, :controllers => {:sessions => "devise/sessions", :registrations => "users"}
resources :users

This last bit is because I want to manage (edit, create and delete) users in my own controller.

The error message I’m getting is as follows:

ActiveRecord::RecordNotFound in UsersController#show

Couldn't find User with ID=sign_out
Rails.root: /home/jaydel/projects/mbsquared-projects/Wilson-Goldrick

app/controllers/users_controller.rb:16:in `show'

In my server logs I see this for the request:

Started GET "/users/sign_out" for 127.0.0.1 at 2011-08-04 13:08:51 -0500
  Processing by UsersController#show as HTML
  Parameters: {"id"=>"sign_out"}

Anyone have any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:59:44+00:00Added an answer on May 24, 2026 at 9:59 am

    The problem lies in the fact that in your logs the signout request is a GET request.

    Started GET "/users/sign_out"
    

    But the signout route is a DELETE

    destroy_user_session DELETE /users/sign_out(.:format) 
    

    The reason why you are getting the exception is that is it getting confused with one of the routes created by resources :users which would be something like

    edit_user GET /users/(:id)(.:format) {:action=>"edit", :controller=>"users"}
    

    Basically ‘sign_out’ is being mistaken as a id.

    I’m not sure why the delete link is not going through as a DELETE request. Though changing

    config.sign_out_via = :delete
    

    to be :get might solve the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok here's my problem in a nutshell I've built a web service from ruby
I opened a ticket for this problem. In a nutshell here is my model:
Here's the problem in a nutshell: <bean id=handlerFactory class=com.westfieldgrp.audit.jdklogging.cpm.CPMHandlerFactory> <property name=schemaName value=${env.audit.databaseSchema} /> <property
Problem Language: C# 2.0 or later I would like to register context handlers to
Problem: We have a web app that calls some web services asynchronously (from the
I have a problem with all my forms in symfony 1.4. They work with
I have a problem when using Jython, but I can't seem to find a
The problem in a nutshell is that in development mode we'd make changes to
Nutshell: How can I disable the auto-scroll back to the top of a ListBox
Here's what I've been trying to do, in a nutshell: class example <T extends

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.