diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-06-26 09:36:40 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-06-26 09:43:35 -0600 |
commit | 3bc314e65830dabd7b1c47ad1fa27be5ace0699f (patch) | |
tree | a34a12dd12aca74f837f48bdfd125830e1766744 /activerecord/lib/active_record/connection_adapters | |
parent | 031588ebe6b449bcba6e3becfaff6978ba10464a (diff) | |
download | rails-3bc314e65830dabd7b1c47ad1fa27be5ace0699f.tar.gz rails-3bc314e65830dabd7b1c47ad1fa27be5ace0699f.tar.bz2 rails-3bc314e65830dabd7b1c47ad1fa27be5ace0699f.zip |
Move writing unknown column exception to null attribute
Making this change revealed several subtle bugs related to models with
no primary key, and anonymous classes. These have been fixed as well,
with regression tests added.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 3ef8878ad1..def04dbed2 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -381,7 +381,7 @@ module ActiveRecord end def table_exists?(name) - return false unless name + return false unless name.present? return true if tables(nil, nil, name).any? name = name.to_s |