class Artist < ActiveRecord::Base has_many :albums, :order => 'has_pic DESC, year ASC, id ASC', :dependent => :destroy has_many :artist_links, :dependent => :destroy end