My Rails system was working fine, but and i was able to access the admin panel without any problem.
But since couple of days after signup it goes in to redirect loop, i'm not sure why is this happening. My routes.rb and application_controller.rb are following.
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'
And application_controller.rb has following code in it.
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
I'm not able to access any link, not just root of admin which is admin/admin_users#index
Any Help wil be appreciated .
Thanks!!
Aucun commentaire:
Enregistrer un commentaire