Fix ordering of stock_changes in delivery (case-insensitive ordering did not work properly for all database flavors)

This commit is contained in:
Julius 2013-06-26 20:14:33 +02:00
parent 8a79dfd167
commit a29d52dcae

View file

@ -5,7 +5,7 @@ class Delivery < ActiveRecord::Base
has_many :stock_changes, has_many :stock_changes,
:dependent => :destroy, :dependent => :destroy,
:include => 'stock_article', :include => 'stock_article',
:order => 'articles.name COLLATE NOCASE ASC' :order => 'articles.name ASC'
scope :recent, :order => 'created_at DESC', :limit => 10 scope :recent, :order => 'created_at DESC', :limit => 10