Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

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.
  • Loading branch information...
commit eff61fcfa806dc2e66712a0dcc572e5dadb939f5 1 parent 21e7b84
@josh josh authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  activesupport/lib/active_support/deprecated_callbacks.rb
2  activesupport/lib/active_support/deprecated_callbacks.rb
@@ -205,6 +205,8 @@ def self.included(base)
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)

3 comments on commit eff61fc


Creating a project and attempting to generate a scaffold results in:

.../activesupport/lib/active_support/deprecation/behaviors.rb:27: private method `warn' called for nil:NilClass (NoMethodError)

More details here:

Please sign in to comment.
Something went wrong with that request. Please try again.