749 equipment max checkout

Resolves #749
Seems like a rails 4 deprecation, we can rewrite that line using a where in a block