From 34509777fd375e5bc529f21ca66cf63263c2cf64 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Mon, 27 Apr 2009 18:16:55 -0700 Subject: Makes new callbacks support keys with special characters --- activesupport/lib/active_support/new_callbacks.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/new_callbacks.rb b/activesupport/lib/active_support/new_callbacks.rb index 7a48dbac04..8a91e1c674 100644 --- a/activesupport/lib/active_support/new_callbacks.rb +++ b/activesupport/lib/active_support/new_callbacks.rb @@ -356,6 +356,7 @@ module ActiveSupport str = <<-RUBY_EVAL def _run_#{symbol}_callbacks(key = nil) if key + key = key.hash.to_s.gsub(/-/, '_') name = "_run__\#{self.class.name.split("::").last}__#{symbol}__\#{key}__callbacks" if respond_to?(name) -- cgit v1.2.3