From fd3532204c7302ec80a245c72852a11288ec38b5 Mon Sep 17 00:00:00 2001 From: Guilherme Mansur Date: Tue, 14 May 2019 15:13:29 -0400 Subject: Better error message for calling columns_hash When a record does not have a table name, as in the case for a record with `self.abstract_class = true` and no `self.table_name` set the error message raises a cryptic: "ActiveRecord::StatementInvalid: Could not find table ''" this patch now raises a new `TableNotSpecified Error` Fixes: #36274 Co-Authored-By: Eugene Kenny --- activerecord/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 8d4b01e995..8642227a2b 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Loading the schema for a model that has no `table_name` raises a `TableNotSpecified` error. + + *Guilherme Mansur*, *Eugene Kenny* + * PostgreSQL: Fix GROUP BY with ORDER BY virtual count attribute. Fixes #36022. -- cgit v1.2.3