From eff61fcfa806dc2e66712a0dcc572e5dadb939f5 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 12 Oct 2009 22:18:41 -0500 Subject: 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. --- activesupport/lib/active_support/deprecated_callbacks.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activesupport/lib/active_support') 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) -- cgit v1.2.3