diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-07 16:15:49 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-05-08 11:37:33 -0700 |
commit | f21da67aab6ad4acc2f11a1eaf800444e3b0fe21 (patch) | |
tree | 498d26d104d6bd4e345fb1daaeabbab999b2936d /activesupport/lib | |
parent | b9903c398eda827729160b1653aff4e8dbba8121 (diff) | |
download | rails-f21da67aab6ad4acc2f11a1eaf800444e3b0fe21.tar.gz rails-f21da67aab6ad4acc2f11a1eaf800444e3b0fe21.tar.bz2 rails-f21da67aab6ad4acc2f11a1eaf800444e3b0fe21.zip |
fix object comparison case
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 9c330d9e2d..689c05ded4 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -99,7 +99,11 @@ module ActiveSupport class Object < Callback def matches?(_kind, _filter) - super && @filter.to_s.start_with?(_method_name_for_object_filter(_kind, _filter, false)) + if !_filter.is_a?(String) + super && @filter.to_s.start_with?(_method_name_for_object_filter(_kind, _filter, false)) + else + super && @filter == _filter + end end end |