ruby on rails - ActiveAdmin: routes for overridden controllers -
i want override login activeadmin. created sessionscontroller
, override create
action like
class admin::sessionscontroller < activeadmin::devise::sessionscontroller def create session[:zzz] = 1 logger.debug("@@@ #{session[:zzz]}") super end end
how should apply changes activeadmin devise controller?
for devise make like
devise_for :users, controllers: {sessions: 'users/sessions'}
in routes.rb
my routes.rb activeadmin
devise_for :admin_users, activeadmin::devise.config activeadmin.routes(self)
i needed add overrided controller's code bottom of config/active_admin.rb
class admin::sessionscontroller < activeadmin::devise::sessionscontroller def create session[:zzz] = 1 logger.debug("@@@ #{session[:zzz]}") super end end
Comments
Post a Comment