浏览代码

Preserve Authlogic before_actions (#140)

* Keep a list of actions NOT to remove, remove all others

* Adds `activate_authlogic` to the list of actions to preserve

* Removes :activate_authlogic from the array of mapped filters
Rob Cameron 7 年之前
父节点
当前提交
b0abf3bcbd
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      app/controllers/blazer/base_controller.rb

+ 4 - 2
app/controllers/blazer/base_controller.rb

@@ -1,7 +1,9 @@
 module Blazer
   class BaseController < ApplicationController
-    # skip all filters
-    filters = _process_action_callbacks.map(&:filter)
+
+    # skip filters
+    filters = _process_action_callbacks.map(&:filter) - [:activate_authlogic]
+
     if Rails::VERSION::MAJOR >= 5
       skip_before_action(*filters, raise: false)
       skip_after_action(*filters, raise: false)