mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #11252 from neerajdotname/use-extract-options
use extract_options!
This commit is contained in:
commit
9cdf891237
1 changed files with 1 additions and 1 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue