diff options
author | Vipul A M <vipulnsward@gmail.com> | 2015-01-31 12:24:44 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2015-02-01 13:01:53 +0530 |
commit | 0928c3f2945339437eda2d555d2846b02f06950f (patch) | |
tree | 6baa408b3a4d1a06e91db527e4fc2041ee2ec713 /activesupport | |
parent | b93b39eff6829ee05ffec1cc8c505f69cbb53fdc (diff) | |
download | rails-0928c3f2945339437eda2d555d2846b02f06950f.tar.gz rails-0928c3f2945339437eda2d555d2846b02f06950f.tar.bz2 rails-0928c3f2945339437eda2d555d2846b02f06950f.zip |
Callback#merge merges options for a callback skip instead of a callback. Renamed it to indicate what it actually does.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 0f1de8b076..98b8f0d34a 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -373,7 +373,7 @@ module ActiveSupport def filter; @key; end def raw_filter; @filter; end - def merge(chain, new_options) + def merge_conditional_options(chain, new_options) options = { :if => @if.dup, :unless => @unless.dup @@ -701,7 +701,7 @@ module ActiveSupport filter = chain.find {|c| c.matches?(type, filter) } if filter && options.any? - new_filter = filter.merge(chain, options) + new_filter = filter.merge_conditional_options(chain, options) chain.insert(chain.index(filter), new_filter) end |