From eed7ea685c6e46b33ca6db3becd893e2b507b50e Mon Sep 17 00:00:00 2001 From: magnolia-fan Date: Wed, 29 Jun 2011 08:32:28 +0400 Subject: [PATCH] Albums order fix --- app/models/artist.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/artist.rb b/app/models/artist.rb index cecf8df..59ffbc9 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -1,3 +1,3 @@ class Artist < ActiveRecord::Base - has_many :albums, :order => 'pic_url DESC, year ASC, id ASC', :dependent => :destroy + has_many :albums, :order => '(pic_url!="" AND pic_url IS NOT NULL) DESC, year ASC, id ASC', :dependent => :destroy end