From 0e7a86bcd5cf388f10217a4968937f19c996d665 Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Fri, 21 Aug 2015 01:04:13 -0700 Subject: [PATCH] Improve game show view --- app/views/games/show.html.haml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/views/games/show.html.haml b/app/views/games/show.html.haml index ebb577e3..d0664be2 100644 --- a/app/views/games/show.html.haml +++ b/app/views/games/show.html.haml @@ -46,23 +46,19 @@ -# TODO better logic, not in view - unless @game.status == nil .table - - if @game.play_to_beat && @game.player_to_beat.user != current_user + -# TODO better logic, not in view. Set play to beat = nil; instead of view logic + - if @game.play_to_beat && @game.player_to_beat != @game.current_player - if @game.play_to_beat.play %h1 Hand to beat - - @game.play_to_beat.play.player_cards.each do |card| + %span.hand-type= @game.play_to_beat.play.hand_type + %div= @game.play_to_beat.play.to_s + -#- @game.play_to_beat.play.player_cards.each do |card| = card.to_s - = @game.play_to_beat.play.player.user.email + %span.player= @game.play_to_beat.play.player.user.email - else %h1 Open table - %h2 - Last Played - - if @game.plays.count > 0 - - @game.plays.last.player_cards.each do |card| - = card.to_s - = @game.plays.last.player.user.email - .controls - if @game.control_user == current_user // Play hand form