aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorNicholas Jakobsen <nicholas.jakobsen@gmail.com>2013-08-07 12:43:22 -0700
committerNicholas Jakobsen <nicholas.jakobsen@gmail.com>2013-08-10 09:13:20 -0700
commit55cbb85fb7b7f4eaaa681e2a74cc8aca225097b7 (patch)
tree525a17d52ba95935cfcf852a2ed7153dd62ce264 /actionpack/lib
parent806bc2add8a0807ca45fb0945856bec89a321fc8 (diff)
downloadrails-55cbb85fb7b7f4eaaa681e2a74cc8aca225097b7.tar.gz
rails-55cbb85fb7b7f4eaaa681e2a74cc8aca225097b7.tar.bz2
rails-55cbb85fb7b7f4eaaa681e2a74cc8aca225097b7.zip
Execute conditional procs on controller filters only for current action.
:only and :except options for controller filters are now added before :if and :unless. This prevents running :if and :unless procs when not on the specified. Closes #11786.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/abstract_controller/callbacks.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb
index 21c6191691..d6c941832f 100644
--- a/actionpack/lib/abstract_controller/callbacks.rb
+++ b/actionpack/lib/abstract_controller/callbacks.rb
@@ -38,7 +38,7 @@ module AbstractController
def _normalize_callback_option(options, from, to) # :nodoc:
if from = options[from]
from = Array(from).map {|o| "action_name == '#{o}'"}.join(" || ")
- options[to] = Array(options[to]) << from
+ options[to] = Array(options[to]).unshift(from)
end
end