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

activerecord: Fix AR::Relation#or can take other kinds of relation #524

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

tk0miya
Copy link
Contributor

@tk0miya tk0miya commented Feb 14, 2024

ActiveRecord::Relation#or can take not only the its own kind of relation but also other kinds of relation.

Example:

Blog.joins(:articles).merge(Blog.where(id: 1).or(Article.where(id: 1)))

`ActiveRecord::Relation#or` can take not only the its own kind of
relation but also other kinds of relation.

Example:

    Blog.joins(:articles).merge(Blog.where(id: 1).or(Article.where(id: 1)))
@tk0miya tk0miya requested a review from pocke as a code owner February 14, 2024 18:54
@pocke pocke merged commit 372c833 into ruby:main Mar 8, 2024
3 checks passed
@tk0miya tk0miya deleted the activerecord_or branch March 11, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants