Evening all,
I have a logout button that was working absolutely fine in a twitter drop down menu. However now after compiling the assets and then cleaning them, the logout button redirects to localhost:3000/logout instead of calling the destroy action in the controller and redirecting to the root path and resetting the session.
my code is as follows, any help would be great, note this link works outside of the drop-down menu
sessions_controller.rb
def destroy
reset_session
flash[:notice] = "successfully logged out"
redirect_to root_path
end
routes
match "/logout", to: "sessions#destroy", via: :delete
header
<li><%= link_to "Logout", "/logout", method: "delete" %></li>
Hard coding the path with
logout_pathsorted this.