aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-10-12 22:18:41 -0500
committerJoshua Peek <josh@joshpeek.com>2009-10-12 22:18:41 -0500
commiteff61fcfa806dc2e66712a0dcc572e5dadb939f5 (patch)
tree21d19e49fd8cbc8c2fea62e7e1163aa291bcbc70 /activesupport
parent21e7b8462113fc7c0fd1882dcc2bf7225de67b1a (diff)
downloadrails-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.rb2
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)