diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-27 18:16:55 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-27 18:16:55 -0700 |
commit | 38bd60eae4b6d0ec6a29036c6a8d45b79b788af9 (patch) | |
tree | 02bb6a1a98f585f6a9d34c143a69f959c3593c18 /activesupport/lib | |
parent | ab83db9d069dea643eeb3588eeee634a780b6735 (diff) | |
download | rails-38bd60eae4b6d0ec6a29036c6a8d45b79b788af9.tar.gz rails-38bd60eae4b6d0ec6a29036c6a8d45b79b788af9.tar.bz2 rails-38bd60eae4b6d0ec6a29036c6a8d45b79b788af9.zip |
Makes new callbacks support keys with special characters
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/new_callbacks.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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) |