This seems like a good place for an instance method on Product, such as

```
def check_inventory(product)
  OrderProduct.find_by(product_id: product.id, order_id: id).quantity > product.inventory
end
```

and call it with simply ```product.check_inventory``` or something.

Alternatively, you could just look at the relation, like ```current_order.products``` ..and then some mashing - save a DB trip.