Created
May 8, 2013 21:56
-
-
Save tenderlove/5543978 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb | |
index e948314..a24b35a 100644 | |
--- a/activesupport/lib/active_support/callbacks.rb | |
+++ b/activesupport/lib/active_support/callbacks.rb | |
@@ -321,7 +321,13 @@ module ActiveSupport | |
_normalize_legacy_filter(kind, filter) | |
scopes = Array(chain.config[:scope]) | |
- method_to_call = scopes.map{ |s| s.is_a?(Symbol) ? send(s) : s }.join("_") | |
+ method_to_call = scopes.map { |s| | |
+ if s.is_a?(Symbol) | |
+ send(s) | |
+ else | |
+ raise("I am glad that this code was totally test driven") | |
+ end | |
+ }.join("_") | |
@klass.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
def #{method_name}(&blk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍