Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Warn that ActiveRecord::Base.reset_subclasses is gone in Rails 3 final.

  • Loading branch information...
commit fb7715b2491380becbaa111a4c5a211bac662e97 1 parent f3bb185
@jeremy jeremy authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 activerecord/lib/active_record/base.rb
View
12 activerecord/lib/active_record/base.rb
@@ -278,6 +278,18 @@ class Base
# on to any new database connections made and which can be retrieved on both a class and instance level by calling +logger+.
cattr_accessor :logger, :instance_writer => false
+ class << self
+ def reset_subclasses #:nodoc:
+ ActiveSupport::Deprecation.warn 'ActiveRecord::Base.reset_subclasses no longer does anything in Rails 3. It will be removed in the final release; please update your apps and plugins.', caller
+ end
+
+ def subclasses
+ descendants
+ end
+
+ deprecate :subclasses => :descendants
+ end
+
##
# :singleton-method:
# Contains the database configuration - as is typically stored in config/database.yml -
Please sign in to comment.
Something went wrong with that request. Please try again.