rails/rails — pull request #15564 by sgrif (2014-06-07 16:28:44+00:00)
Title: Remove dead branch when restoring ID within a transaction

There is no way to have an instance of an Active Record model where
`has_attribute?(self.class.primary_key)` returns false. The record is
always initialized in such a way that `@raw_attributes` will have an id
key with nil for the value.

Reduces the number of places outside of attribute methods which care
about the internals of how we store and type cast attributes.