Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
More helpful error message when instantiating an abstract class #9474
Calling a literal
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.