diff options
author | Guilherme Mansur <guilherme.mansur@shopify.com> | 2019-05-14 15:13:29 -0400 |
---|---|---|
committer | Guilherme Mansur <guilherme.mansur@shopify.com> | 2019-06-19 14:23:03 -0400 |
commit | fd3532204c7302ec80a245c72852a11288ec38b5 (patch) | |
tree | 131dfba225f5763409e691a021b96f654e879fba /activerecord/lib/active_record/sanitization.rb | |
parent | aae270de9e0862f31b14642908472d235a17936f (diff) | |
download | rails-fd3532204c7302ec80a245c72852a11288ec38b5.tar.gz rails-fd3532204c7302ec80a245c72852a11288ec38b5.tar.bz2 rails-fd3532204c7302ec80a245c72852a11288ec38b5.zip |
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 <elkenny@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/sanitization.rb')
0 files changed, 0 insertions, 0 deletions