diff options
Diffstat (limited to 'activesupport')
-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 |