Closed tk0miya closed 3 months ago
ActiveRecord::Relation#or can take not only the its own kind of relation but also other kinds of relation.
ActiveRecord::Relation#or
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: