1
0
Fork 0
oldhaven/rails/app/models/track.rb

13 lines
227 B
Ruby
Raw Normal View History

class Track < ActiveRecord::Base
set_table_name 'musicbrainz.bh_track'
2011-04-05 22:58:11 +00:00
belongs_to :release
2011-04-05 22:58:11 +00:00
def convertLength
(length /= 1000).round!
end
2011-04-05 22:58:11 +00:00
def clearName
name.gsub('&', 'and').gsub(/[^a-z0-9]/, '').downcase
end
end