|
class Artist < ActiveRecord::Base
|
|
set_table_name 'musicbrainz.bh_artist'
|
|
has_many :albums, :conditions => "release_type = 1", :order => 'year ASC, id ASC'
|
|
|
|
def self.getByName(name)
|
|
Artist.first(:conditions => ['name = ? AND id=credit_id', name], :order => 'rating DESC')
|
|
end
|
|
end
|