Use of .zero? instead of == 0

This commit is contained in:
David Vandorpe 2015-07-08 17:06:02 +02:00
parent 7831520c6f
commit d397ae7d34

View file

@ -1,5 +1,5 @@
<div class="col-md-3 form_products">
<div class="thumbnail<%= product.stock ==0 ? ' out-of-stock' : '' %>">
<div class="thumbnail<%= ' out-of-stock' if product.stock.zero? %>">
<div class="form_row center">
<div class="form_row_image">
<%= image_tag product.avatar %>