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

9 lines
286 B
Ruby
Raw Normal View History

2011-04-03 18:32:27 +00:00
class Artist < ActiveRecord::Base
set_table_name 'musicbrainz.bh_artist'
2011-04-05 22:58:11 +00:00
has_many :albums, :conditions => "release_type = 1", :order => 'year ASC, id ASC'
2011-04-03 18:32:27 +00:00
def self.getByName(name)
Artist.first(:conditions => ['name = ? AND id=credit_id', name], :order => 'rating DESC')
end
end