Adapt product.managed_by scope to rails 4

This commit is contained in:
luisramos0
2019-04-06 21:09:42 +01:00
parent a783f4609a
commit e9667ab289

View File

@@ -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
}