Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # users are dynamic
- Class User
- has_many :games
- has_many :items, :through => :games
- has_many :objectives, :through => :games
- has_one :backpack, :through => :games
- end
- # Game Model serves as a go-between for users (dynamic) and gameplay (static)
- Class Game
- belongs_to :user
- belongs_to :item
- belongs_to :objective
- belongs_to :backpack
- end
- # everything below this comment is a static game variable, essentially
- Class Item
- has_many :games
- has_many :users :through => :games
- end
- Class Objectives
- has_many :games
- has_many :users, :through => :games
- end
- Class Backpack
- has_many :games
- has_many :users, :through => :games
- end
Add Comment
Please, Sign In to add comment