我正在尝试将用户重定向到我的 root_path,它/
允许未经身份验证的用户使用,但我似乎无法更改active admin
.
我知道active admin
用作devise
身份验证机制,但我无法覆盖devise
任何一个的默认值。
我在我的application_controller.rb
(即使它应该是默认值)中尝试了以下内容:
# Overwriting the sign_out redirect path method
def after_sign_out_path_for(resource_or_scope)
root_path
end
但我仍然在我的日志中看到这一点:
Started GET "/admin/logout?locale=fr" for 127.0.0.1 at 2012-06-07 11:30:15 -0400
Processing by ActiveAdmin::Devise::SessionsController#destroy as HTML
Parameters: {"locale"=>"fr"}
AdminUser Load (0.4ms) SELECT `admin_users`.* FROM `admin_users` WHERE `admin_users`.`id` = 1 LIMIT 1
(0.1ms) BEGIN
(0.3ms) UPDATE `admin_users` SET `remember_created_at` = NULL, `updated_at` = '2012-06-07 15:30:15' WHERE `admin_users`.`id` = 1
(0.5ms) COMMIT
Redirected to http://localhost:3000/admin
Completed 302 Found in 47ms
所以它让我回到登录页面。