Fixed bug when distuingish between finished and closed orders.

This commit is contained in:
Benjamin Meichsner 2009-03-13 00:06:20 +01:00
parent 20d4177990
commit 1791243b25
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ class GroupOrder < ActiveRecord::Base
validates_uniqueness_of :ordergroup_id, :scope => :order_id # order groups can only order once per order
named_scope :open, lambda { {:conditions => ["order_id IN (?)", Order.open.collect(&:id)]} }
named_scope :finished, lambda { {:conditions => ["order_id IN (?)", Order.finished.collect(&:id)]} }
named_scope :finished, lambda { {:conditions => ["order_id IN (?)", Order.finished_not_closed.collect(&:id)]} }
# Updates the "price" attribute.
# This will be the maximum value of an open order or