Typecast 'id' attribute in read_attribute when using custom pks #5661

merged 2 commits into from Mar 30, 2012


None yet

3 participants

Ruby on Rails member

Related to this awesome cleanup ❤️.

When using custom primary keys, the id attribute works as an alias to the pk. But in case of read_attribute, when reading the id it was not being typecasted after the change.

Also added a deprecation message to type_cast_code according to the conversation in the same commit.


@tenderlove tenderlove merged commit 130064d into rails:master Mar 30, 2012
Ruby on Rails member

Doh, I didn't realise I had broken the build! Thanks for fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment