diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-09 15:12:31 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-10 10:13:22 -0700 |
commit | 95e7e56efcad98b6b89e407ced78512ea16268e6 (patch) | |
tree | 3f402574e6503ae43feb71ff44d0be9302c28492 | |
parent | d4dcd6e41f4a7c202270e7d510434351ce333ebc (diff) | |
download | rails-95e7e56efcad98b6b89e407ced78512ea16268e6.tar.gz rails-95e7e56efcad98b6b89e407ced78512ea16268e6.tar.bz2 rails-95e7e56efcad98b6b89e407ced78512ea16268e6.zip |
object based callbacks cannot be duplicated
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 511162f20f..2ea41ab2f2 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -89,10 +89,7 @@ module ActiveSupport end class Callback #:nodoc:# - class Basic < Callback - end - - class Object < Callback + class Unduplicable < Callback # :nodoc: def duplicates?(other) false end @@ -100,10 +97,10 @@ module ActiveSupport def self.build(chain, filter, kind, options, _klass) klass = case filter - when Array, Symbol, String - Callback::Basic + when Symbol, String + Callback else - Callback::Object + Callback::Unduplicable end klass.new chain, filter, kind, options, _klass end |