From 8b8a7c08cdccc0dd1bbb33e65d36a4cc145720cf Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Wed, 13 May 2009 12:52:35 +0200 Subject: [PATCH] Fixed bug in ArticlePrice history. Closes #12 --- app/models/article.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/article.rb b/app/models/article.rb index a3f70392..b12288b2 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -32,7 +32,7 @@ class Article < ActiveRecord::Base # Associations belongs_to :supplier belongs_to :article_category - has_many :article_prices, :order => "created_at" + has_many :article_prices, :order => "created_at DESC" named_scope :available, :conditions => {:availability => true} named_scope :not_in_stock, :conditions => {:type => nil}