use union all

This commit is contained in:
Pete Matsyburka committed 2025-07-01 09:16:50 +03:00
1 parent 8ad70b7e74
commit eef2d9d599
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ module Abilities
TemplateSharing.where({ ability:, account_id: [user.account_id, TemplateSharing::ALL_ID] }.compact)
.select(:template_id)
Template.where(Template.arel_table[:id].in(templates.select(:id).arel.union(shared_ids.arel)))
Template.where(Template.arel_table[:id].in(templates.select(:id).arel.union(:all, shared_ids.arel)))
end
def entity(template, user:, ability: nil)