Basic setting playlist
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class Playlist < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
belongs_to :artist
|
||||
has_many :playlist_items
|
||||
end
|
||||
|
||||
@@ -3,6 +3,7 @@ class Artist < ActiveRecord::Base
|
||||
has_many :artist_links, :dependent => :destroy
|
||||
has_many :artist_aliases, :dependent => :destroy
|
||||
has_many :tracks, :through => :track_artists
|
||||
has_many :playlists
|
||||
|
||||
after_initialize :prepare_description
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ class Track < ActiveRecord::Base
|
||||
belongs_to :album
|
||||
has_many :track_artists
|
||||
has_many :artists, :through => :track_artists
|
||||
@duration
|
||||
has_many :playlist_items
|
||||
|
||||
def duration
|
||||
if self.length
|
||||
|
||||
Reference in New Issue
Block a user