Use scope

This commit is contained in:
Rohan Mitchell
2014-12-11 15:00:44 +11:00
parent 3cc79d0036
commit eab2e5de2a

View File

@@ -64,7 +64,7 @@ module OpenFoodNetwork
end
def filter_not_deleted(variants)
variants.where("spree_variants.deleted_at is null")
variants.not_deleted
end
def filter_on_hand(variants)