-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logout link missing :method => 'delete' #248
Comments
I get this too - is there an easy fix? |
I thought I fixed it here #249 and I swear I had it work once or twice in a sample application but when I tested it in my application, it still didn't work. Also, I realized I should've updated the specs to prove it worked. I'm going to keep working on it. |
I think the issue is that active admin isn't loading the jquery rails file (called active_admin_vendor.js in active admin) which is what actually makes the :method => :delete work. I forked activeadmin to fix this thinking there wasn't much development going on anymore before I realized that there were some really recent commits on the project. Here is the commit that fixed it for me: |
Thanks @opondor, that explains it. I must've tested my fix in my real application when I still had jquery-rails installed (which I later removed). I'll see if I can't find some time to create a clean fork using your commit and write a test for it too some time soon. |
While we wait to a proper fix to the problem I have this patch for /config/routes.rb
In this way we don't need to mess around with fork and so on... |
Thanks @libo ... |
* Updated generator to work with latest Devise
The logout link, https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/header_renderer.rb#L30, is missing the :method parameter so a user gets a routing error for '/admin/logout'.
The text was updated successfully, but these errors were encountered: