1
0
Fork 0
oldhaven/app/models/artist.rb

9 lines
286 B
Ruby

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