diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-02 10:27:02 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-02 10:27:02 -0700 |
commit | 9cdf8912374bffa8e9b1797237582876a4e8ec4e (patch) | |
tree | 7b9432f95a32e289e9f6730f8260618480d58b6a /actionpack | |
parent | 17d2e445d2e887655bf321f628ba79e7bc4202aa (diff) | |
parent | 70568b4bbd2cb34681b35b15d12e45342eba638a (diff) | |
download | rails-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.rb | 2 |
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| |