diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-07-02 17:05:18 +0530 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2013-07-02 22:46:31 +0530 |
commit | 70568b4bbd2cb34681b35b15d12e45342eba638a (patch) | |
tree | 8c3baba6c1d41ca3777a07b0f5f888dc95f84140 /actionpack | |
parent | f875d319ad32d63ce2d3e8a343b059858f28dd97 (diff) | |
download | rails-70568b4bbd2cb34681b35b15d12e45342eba638a.tar.gz rails-70568b4bbd2cb34681b35b15d12e45342eba638a.tar.bz2 rails-70568b4bbd2cb34681b35b15d12e45342eba638a.zip |
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| |