aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorAaron Weiner <aweiner@mdsol.com>2013-02-27 18:17:29 -0500
committerAaron Weiner <aweiner@mdsol.com>2013-03-03 12:36:51 -0500
commit53f18f2c5475809f7f6c5576aba89d6340a57c06 (patch)
treed1ae1d758acc64933ac592866b5b94745ded553b /activerecord/CHANGELOG.md
parent48c21e3255fa2f4b1875ca8616a5ad7706a7a4cb (diff)
downloadrails-53f18f2c5475809f7f6c5576aba89d6340a57c06.tar.gz
rails-53f18f2c5475809f7f6c5576aba89d6340a57c06.tar.bz2
rails-53f18f2c5475809f7f6c5576aba89d6340a57c06.zip
More helpful error message when instantiating an abstract class
Calling a literal ActiveRecord::Base.new raises NoMethodError, since it ends up calling Class.abstract_class? which does not exist. Similarly, instantiating an actual abstract class hits the database, when conventionally it should immediately throw NotImplementedError. ActiveRecord::Base can't be made abstract without breaking many, many things, so check for it separately.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 2eaf388095..2f96a7b5cf 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,9 @@
## Rails 4.0.0 (unreleased) ##
+* Throw `NotImplementedError` when trying to instantiate Base or an abstract class.
+
+ *Aaron Weiner*
+
* Postgresql timestamp with time zone (timestamptz) datatype now returns a
ActiveSupport::TimeWithZone instance instead of a string