Album has_pic fix, production gems fix

This commit is contained in:
magnolia-fan
2011-06-30 09:29:24 +04:00
parent 13a233ac72
commit 31a1cb88e2
5 changed files with 19 additions and 7 deletions
+1
View File
@@ -121,6 +121,7 @@ class ImportController < ApplicationController
album.mbid = mb_album['id']
album.album_type = mb_album['type']
album.pic_url = album_image
album.has_pic = (album_image != '' and not album_image.nil?)
album.save unless dry_run
ap album if dry_run
+1 -1
View File
@@ -1,3 +1,3 @@
class Artist < ActiveRecord::Base
has_many :albums, :order => '(pic_url!="" AND pic_url IS NOT NULL) DESC, year ASC, id ASC', :dependent => :destroy
has_many :albums, :order => 'has_pic DESC, year ASC, id ASC', :dependent => :destroy
end