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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AR Enumerators for models with composite primary keys using :id #431

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

adrianna-chang-shopify
Copy link
Contributor

We need to use #id_value instead of #id for models with composite primary keys when accessing the record value, because #id gives us back the primary key value when we want the :id column value.

We need to use `#id_value` instead of `#id` for models with composite
primary keys when accessing the record value, because `#id` gives
us back the primary key value when we want the `:id` column value.

Co-authored-by: Nikita Vasilevsky <nikita.vasilevsky@shopify.com>
Copy link
Contributor

@nvasilevski nvasilevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@adrianna-chang-shopify adrianna-chang-shopify merged commit a335be2 into main Sep 12, 2023
40 checks passed
@adrianna-chang-shopify adrianna-chang-shopify deleted the ac-fix-cpk-enumerators branch September 12, 2023 15:34
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems September 12, 2023 15:36 Inactive
@Mangara
Copy link
Contributor

Mangara commented Sep 12, 2023

Thanks for fixing this! Could you add it to the change log as unreleased?

@adrianna-chang-shopify
Copy link
Contributor Author

Yes, thanks for the nudge @Mangara !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants