Permalink
Browse files

fix object comparison case

  • Loading branch information...
1 parent b9903c3 commit f21da67aab6ad4acc2f11a1eaf800444e3b0fe21 @tenderlove tenderlove committed May 7, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 activesupport/lib/active_support/callbacks.rb
@@ -99,7 +99,11 @@ def matches?(_kind, _filter)
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

0 comments on commit f21da67

Please sign in to comment.