Guest User

Untitled

a guest
Mar 17th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. # how and what do i relate scores back to? do i store a record with just half the score?
  2. # meaning when i save a score, do i save two records? one with the home score and the
  3. # other with the visitor score? or do i save one record with both? the second option
  4. # allows me to store a winner group_id so i don't have to calc it in the future. but
  5. # then building a group record becomes calc heavy.
  6.  
  7. # i suppose in the two record idea i could store a 'is_winner' bool
  8.  
  9. # thoughts?
  10.  
  11. # results in /groups/13/
  12. map.resources :groups do |group|
  13. group.resources :scorings
  14.  
  15. #does this then result in /groups/13/games ?
  16. group.resources :games
  17. end
  18.  
  19.  
  20. map.resources :games do |game|
  21. game.resources :players
  22. game.resources :scorings
  23. end
Add Comment
Please, Sign In to add comment