rails/rails — pull request #18259 by arthurnn (2014-12-30 17:39:32+00:00)
Title: Ensures that primary_key method will return nil when multi-pk

When table has a composite primary key, the `primary_key` method for
sqlite3 and postgresql was only returning the first field of the key.

Ensures that it will return nil instead, as AR dont support composite pks.

[fixes #18070] - more context here https://github.com/rails/rails/issues/18070#issuecomment-67701444

review @rafaelfranca @tenderlove @sgrif