5 Matching Annotations
- Feb 2021
-
stackoverflow.com stackoverflow.com
-
Yes, i'm trying to find the union of two relations
I guess that's what I needed too. How much of the time can a or() be converted to a union?
-
-
github.com github.com
-
where_values_hash.reduce(&:or)
-
scope :deck_access, ->(user) { includes(:deck_permissions).where(where({ deck_permissions: { user_id: user.id, read_access: true } }, global_deck_read: true, user_id: user.id).where_values_hash.reduce(&:or)) }
-
-
github.com github.com
-
# Returns a new relation, which is the logical union of this relation and the one passed as an # argument. # # The two relations must be structurally compatible: they must be scoping the same model, and # they must differ only by #where (if no #group has been defined) or #having (if a #group is # present). Neither relation may have a #limit, #offset, or #distinct set.
-
- May 2020
-
en.wikipedia.org en.wikipedia.org