Structuring models directory

This commit is contained in:
magnolia-fan
2011-09-26 03:14:59 +04:00
parent c883b7586c
commit d142c516be
24 changed files with 18 additions and 8 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
+3
View File
@@ -0,0 +1,3 @@
class Session < ActiveRecord::Base
belongs_to :user
end
+4
View File
@@ -0,0 +1,4 @@
class User < ActiveRecord::Base
bitmask :music, :as => [:album, :single, :live, :bootleg, :soundtrack]
has_one :session
end