mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Adapt product.managed_by scope to rails 4
This commit is contained in:
@@ -112,7 +112,7 @@ Spree::Product.class_eval do
|
||||
if user.has_spree_role?('admin')
|
||||
scoped
|
||||
else
|
||||
where('supplier_id IN (?)', user.enterprises)
|
||||
where('supplier_id IN (?)', user.enterprises.select("enterprises.id"))
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user