Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate read_attribute(:id) returning the primary key #49019

Commits on Aug 23, 2023

  1. Deprecate read_attribute(:id) returning the primary key

    This commit deprecates `read_attribute(:id)` returning the primary key
    if the model's primary key is not the id column. Starting in Rails 7.2,
    `read_attribute(:id)` will always return the value of the id column.
    
    This commit also changes `read_attribute(:id)` for composite primary
    key models to return the value of the id column, not the composite
    primary key.
    adrianna-chang-shopify committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ac83311 View commit details
    Browse the repository at this point in the history