I have the following code in my view:
<%= link_to \'Sign out\', destroy_user_session_path, method: :delete %>
Which
Consider these two points to get rid of this error:
In your routes.rb
(if you don't want to use :delete
method):
devise_for :users do get '/users/sign_out' => 'devise/sessions#destroy' end
sign_out
link must have to contain :method => :delete
(already you have)
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>
And finally, in your layout
put:
<%= javascript_include_tag :defaults %>
Thanks.