module ActionController class Base def after_sign_out_path_for(resource_or_scope) params[:callback_url] || session[:referrer] || root_path end def after_sign_in_path_for(resource_or_scope) Authentifyd.default_after_sign_in_path || root_path end ActiveSupport.run_load_hooks :authentifyd_action_controller_extension, self end end