Quellcode durchsuchen

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 vor 7 Jahren
Ursprung
Commit
b0abf3bcbd
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  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)