Guest User

Untitled

a guest
Jun 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def punch_asshole
  2. if Shot.where("cup != 0 and round_id = ? and team_id = ?", round.id, game.away.id).count == 2
  3. Player.includes(:shots).where("shots.cup == 0 and shots.round_id = ? and shots.team_id = ?", round.id, game.away.id).assholes += 1
  4. end
  5. if Shot.where("cup != 0 and round_id = ? and team_id = ?", round.id, game.home.id).count == 2
  6. Player.includes(:shots).where("shots.cup == 0 and shots.round_id = ? and shots.team_id = ?", round.id, game.home.id).assholes += 1
  7. end
  8. end
Add Comment
Please, Sign In to add comment