简体   繁体   中英

Active_Admin routing issue

I have installed Active_Admin gem in my app but I have a filter on my application so the only page you can get to is the log in page. When I try to access the active_admin page it routes me to my log in page of my application, not my admin log in. When I log into my application I can then access the active_admin log in page. My question is where I would put my skip_before_filter statement in this gem? Thank You.

You would put the skip filter in your Application Controller. This could be in a lib/my_active_admin.rb. Then require 'my_active_admin' in applications_controller before the ApplicationControllers definition.

module ActiveAdmin
  class ResourceController < BaseController
    before_filter :my_filter

    protected

    def my_filter
      <logic here>
    end
  end
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM