Favorite and playlist models

This commit is contained in:
magnolia-fan
2011-06-22 04:05:12 +04:00
parent 9531230f6e
commit 9558f720ca
13 changed files with 143 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
class Favorite < ActiveRecord::Base
belongs_to :user
belongs_to :artist
belongs_to :album
belongs_to :track
end
+4
View File
@@ -0,0 +1,4 @@
class Playlist < ActiveRecord::Base
belongs_to :user
has_many :playlist_tracks
end
+4
View File
@@ -0,0 +1,4 @@
class PlaylistItem < ActiveRecord::Base
belongs_to :playlist
belongs_to :track
end