diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-12 22:18:41 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-12 22:18:41 -0500 |
commit | eff61fcfa806dc2e66712a0dcc572e5dadb939f5 (patch) | |
tree | 21d19e49fd8cbc8c2fea62e7e1163aa291bcbc70 /activesupport | |
parent | 21e7b8462113fc7c0fd1882dcc2bf7225de67b1a (diff) | |
download | rails-eff61fcfa806dc2e66712a0dcc572e5dadb939f5.tar.gz rails-eff61fcfa806dc2e66712a0dcc572e5dadb939f5.tar.bz2 rails-eff61fcfa806dc2e66712a0dcc572e5dadb939f5.zip |
Insert a deprecation warn notice when using AS::DeprecatedCallbacks.
We are still using DeprecatedCallbacks in AS and AR. This is meant to annoy the
shit out of Rails core until we fix it.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/deprecated_callbacks.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/deprecated_callbacks.rb b/activesupport/lib/active_support/deprecated_callbacks.rb index ec842d01a1..20fb03cbeb 100644 --- a/activesupport/lib/active_support/deprecated_callbacks.rb +++ b/activesupport/lib/active_support/deprecated_callbacks.rb @@ -205,6 +205,8 @@ module ActiveSupport module ClassMethods def define_callbacks(*callbacks) + ActiveSupport::Deprecation.warn('ActiveSupport::DeprecatedCallbacks has been deprecated in favor of ActiveSupport::Callbacks', caller) + callbacks.each do |callback| class_eval <<-"end_eval", __FILE__, __LINE__ + 1 def self.#{callback}(*methods, &block) # def self.before_save(*methods, &block) |