diff options
author | yui-knk <spiketeika@gmail.com> | 2016-01-30 16:47:51 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2016-01-30 16:47:51 +0900 |
commit | 444c4d05fea817fcad991e79fa128b640e2e4ff1 (patch) | |
tree | 442c6ef8de128d9828637249d613e1ada0203868 /activerecord/test/cases/migration/index_test.rb | |
parent | 6162c49e40582bf058a6bb82ccc0cfb8f92332b6 (diff) | |
download | rails-444c4d05fea817fcad991e79fa128b640e2e4ff1.tar.gz rails-444c4d05fea817fcad991e79fa128b640e2e4ff1.tar.bz2 rails-444c4d05fea817fcad991e79fa128b640e2e4ff1.zip |
Warn if `AR.primary_key` is called for a table who has composite primary key
If `AR.primary_key` is called for a table who has composite primary key,
the method returns `nil`. This behavior sometimes generates invalid SQL.
The first time developers notice to invalid SQL is when they execute
SQL. This commit enables developers to know they are doing something
dangerous as soon as possible.
Diffstat (limited to 'activerecord/test/cases/migration/index_test.rb')
0 files changed, 0 insertions, 0 deletions