Updated router. Temporarly replaced routing filter with rails internal.
This commit is contained in:
parent
b71fcdf371
commit
eab16e337e
21 changed files with 190 additions and 128 deletions
|
|
@ -12,8 +12,8 @@ class GroupOrder < ActiveRecord::Base
|
|||
validates_numericality_of :price
|
||||
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_not_closed.collect(&:id)]} }
|
||||
scope :open, lambda { {:conditions => ["order_id IN (?)", Order.open.collect(&:id)]} }
|
||||
scope :finished, lambda { {:conditions => ["order_id IN (?)", Order.finished_not_closed.collect(&:id)]} }
|
||||
|
||||
# Updates the "price" attribute.
|
||||
# Until the order is finished this will be the maximum price or
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue