aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-05-09 15:12:31 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-05-10 10:13:22 -0700
commit95e7e56efcad98b6b89e407ced78512ea16268e6 (patch)
tree3f402574e6503ae43feb71ff44d0be9302c28492
parentd4dcd6e41f4a7c202270e7d510434351ce333ebc (diff)
downloadrails-95e7e56efcad98b6b89e407ced78512ea16268e6.tar.gz
rails-95e7e56efcad98b6b89e407ced78512ea16268e6.tar.bz2
rails-95e7e56efcad98b6b89e407ced78512ea16268e6.zip
object based callbacks cannot be duplicated
-rw-r--r--activesupport/lib/active_support/callbacks.rb11
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