Fixed bug in orders index if order.ends.nil?

This commit is contained in:
Benjamin Meichsner 2010-06-19 12:23:18 +02:00
parent db52c6e4ed
commit fbf6a283a0
3 changed files with 8 additions and 3 deletions

View file

@ -22,8 +22,9 @@
%th{:colspan => "2"}
%tbody
- for order in @open_orders
- active = (order.open? and order.ends < Time.now) ? " active" : ""
%tr{:class => cycle('even', 'odd', :name => 'open_orders') + active}
- tr_class = cycle('even', 'odd', :name => 'open_orders')
- tr_class += " active" if order.expired?
%tr{:class => tr_class}
%td=h order.name
%td=h format_time(order.ends) unless order.ends.nil?
%td=h truncate(order.note)