aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-02 10:27:02 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-02 10:27:02 -0700
commit9cdf8912374bffa8e9b1797237582876a4e8ec4e (patch)
tree7b9432f95a32e289e9f6730f8260618480d58b6a /actionpack
parent17d2e445d2e887655bf321f628ba79e7bc4202aa (diff)
parent70568b4bbd2cb34681b35b15d12e45342eba638a (diff)
downloadrails-9cdf8912374bffa8e9b1797237582876a4e8ec4e.tar.gz
rails-9cdf8912374bffa8e9b1797237582876a4e8ec4e.tar.bz2
rails-9cdf8912374bffa8e9b1797237582876a4e8ec4e.zip
Merge pull request #11252 from neerajdotname/use-extract-options
use extract_options!
Diffstat (limited to 'actionpack')
-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 19cfd7dae1..21c6191691 100644
--- a/actionpack/lib/abstract_controller/callbacks.rb
+++ b/actionpack/lib/abstract_controller/callbacks.rb
@@ -71,7 +71,7 @@ module AbstractController
# * <tt>name</tt> - The callback to be added
# * <tt>options</tt> - A hash of options to be used when adding the callback
def _insert_callbacks(callbacks, block = nil)
- options = callbacks.last.is_a?(Hash) ? callbacks.pop : {}
+ options = callbacks.extract_options!
_normalize_callback_options(options)
callbacks.push(block) if block
callbacks.each do |callback|