spree/spree — pull request #1409 by jeebster (2012-04-16 15:49:45+00:00)
Title: Tweak product.hast_stock? method

This request is in response to Issue #1373. Here's the tweaked logic:

```ruby
# Returns true if there are inventory units (any variant) with "on_hand" state for this product
# Variants take precedence over master
def has_stock?
variants.any? ? variants.any?(&:in_stock?) : master.in_stock?
end
```