aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-13 02:06:06 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-02-13 02:47:46 +0900
commit0ee96d13de29680e148ccb8e5b68025f29fd091c (patch)
treee8e2095bc74f34b8a0447cace738368e8ff79bef /activerecord/test/schema
parented9acb4fcc793ce1ab68a0e5076dc9458cc7f218 (diff)
downloadrails-0ee96d13de29680e148ccb8e5b68025f29fd091c.tar.gz
rails-0ee96d13de29680e148ccb8e5b68025f29fd091c.tar.bz2
rails-0ee96d13de29680e148ccb8e5b68025f29fd091c.zip
Fix `pluck` and `select` with custom attributes
Currently custom attributes are always qualified by the table name in the generated SQL wrongly even if the table doesn't have the named column, it would cause an invalid SQL error. Custom attributes should only be qualified if the table has the same named column.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 86d5a67a13..349b8afc48 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -247,6 +247,7 @@ ActiveRecord::Schema.define do
create_table :contracts, force: true do |t|
t.references :developer, index: false
t.references :company, index: false
+ t.string :metadata
end
create_table :customers, force: true do |t|