Upgraded to rails 3.1.8. Fixed various bugs in wiki.

This commit is contained in:
benni 2012-09-30 21:15:55 +02:00
parent cd91436f7f
commit 29a6cd8b62
106 changed files with 430 additions and 22436 deletions

View file

@ -23,11 +23,11 @@ class Order < ActiveRecord::Base
after_update :update_price_of_group_orders
# Finders
scope :open, :conditions => {:state => 'open'}, :order => 'ends DESC'
scope :finished, :conditions => "state = 'finished' OR state = 'closed'", :order => 'ends DESC'
scope :finished_not_closed, :conditions => {:state => 'finished'}, :order => 'ends DESC'
scope :closed, :conditions => {:state => 'closed'}, :order => 'ends DESC'
scope :stockit, :conditions => {:supplier_id => 0}, :order => 'ends DESC'
scope :open, where(state: 'open').order('ends DESC')
scope :finished, where("state = 'finished' OR state = 'closed'").order('ends DESC')
scope :finished_not_closed, where(state: 'finished').order('ends DESC')
scope :closed, where(state: 'closed').order('ends DESC')
scope :stockit, where(supplier_id: 0).order('ends DESC')
def stockit?
supplier_id == 0