Skip before filter with Active Admin
In config/initializers/active_admin.rb
you can add the following:
config.skip_before_action :authenticate_user!
You can also use the DSL provided to modify the ActiveAdmin controller: http://activeadmin.info/docs/8-custom-actions.html#modify_the_controller
Note: For Rails versions before 5.0 you will want to use skip_before_filter
.
I couldn't get @coreyward's solution to work, but editing config/application.rb
as per this Devise post and adding:
ActiveAdmin.register_page "Dashboard" do controller do skip_before_action :name_of_filter_to_skip end # Other codeend
to admin/dashboard.rb
did the trick. It didn't work by just editing config/application.rb
alone. Make sure to restart your server!
both of the corey and Sooie are right... but only partially, to stop your blanket authorize_user! filter from affecting active_admin you need to implement both of their answers...
config/initializers/active_admin.rb
config.skip_before_filter :authorize_user!
app/admin/dashboard.rb
controller do skip_before_filter :authorize_user!end