Fixed bug when distuingish between finished and closed orders.
This commit is contained in:
parent
20d4177990
commit
1791243b25
3 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue