Aaron
Aaron

Reputation: 707

Devise is giving me a routing error when logging out. Rails 4

For some reason I can't log out of Devise, it keeps giving me a no route error.

Upvotes: 0

Views: 25

Answers (1)

Aaron
Aaron

Reputation: 707

Make sure that destroy_user_session_path is a delete method. Your logout link should look like this:

<%= link_to destroy_user_session_path, method: :delete %>

Also, ensure that you have this inside application.js:

//= require jquery_ujs

Upvotes: 1

Related Questions