Ruby on rails 活动管理员在登录后重定向循环

Ruby on rails 活动管理员在登录后重定向循环,ruby-on-rails,ruby,ruby-on-rails-3,routes,activeadmin,Ruby On Rails,Ruby,Ruby On Rails 3,Routes,Activeadmin,我的Rails系统工作正常,我能够访问管理面板,没有任何问题 但由于注册后几天它进入重定向循环,我不知道为什么会发生这种情况。My routes.rb和application_controller.rb如下所示 routes.rb root :to => 'home#index' devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) match 'ADMIN' => 'a

我的Rails系统工作正常,我能够访问管理面板,没有任何问题

但由于注册后几天它进入重定向循环,我不知道为什么会发生这种情况。My routes.rb和application_controller.rb如下所示

routes.rb

root :to => 'home#index'

  devise_for :admin_users, ActiveAdmin::Devise.config
  ActiveAdmin.routes(self)
  match 'ADMIN' => 'admin/admin_users#index'

  match 'admin/wallet_withdraws/confirm' => 'admin/wallet_withdraws#confirm'
应用程序\u控制器。rb中有以下代码

def authenticate_active_admin_user!
    render :text => "Tets" and return
        authenticate_admin_user!
        unless current_admin_user.role?(:superadmin)
            flash[:alert] = "You are not authorized to access this resource!"
            redirect_to root_path
        end
  end
我无法访问任何链接,不仅仅是管理员的根目录,它是
admin/admin\u用户#索引

任何帮助都将不胜感激


谢谢

您是否也碰巧使用了Desive?如果是这样,请确保您的设计路由优先于ActiveAdmin路由