aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/callbacks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/abstract_controller/callbacks.rb')
-rw-r--r--actionpack/lib/abstract_controller/callbacks.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb
index d5317e4717..d63ce9c1c3 100644
--- a/actionpack/lib/abstract_controller/callbacks.rb
+++ b/actionpack/lib/abstract_controller/callbacks.rb
@@ -48,7 +48,8 @@ module AbstractController
def _normalize_callback_option(options, from, to) # :nodoc:
if from = options[from]
- from = Array(from).map {|o| "action_name == '#{o}'"}.join(" || ")
+ _from = Array(from).map(&:to_s).to_set
+ from = proc {|c| _from.include? c.action_name }
options[to] = Array(options[to]).unshift(from)
end
end