I am attempting to use active admin with a project. This project also uses another gem to separate out different tenants, as well as has_secure_password for normal authentication.
I am having an issue skipping both of these filters when the user goes to active admin (just a different namespace – admin).
class ApplicationController < ActionController::Base
force_ssl
helper :all
protect_from_forgery
set_current_tenant_by_subdomain(:account, :subdomain) # need to skip this call when in the admin namespace
before_filter :require_user # need to skip this call when in the admin namespace
end
Thanks for your help!
You could create a BaseController that includes
set_current_tenant_by_subdomainandbefore_filter :require_userand have your non-admin controllers inherit from that, while your admin controller inherits directly from the ApplicationController. That’s worked for me in the past.