From b23d0444380f742bde066c5e98d2beef6ca0fcb1 Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Sun, 20 Oct 2019 21:57:26 -0700 Subject: [PATCH] Auto refresh unless my turn --- app/views/layouts/application.html.erb | 1 + app/views/tables/show.html.haml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 90bc2e2..910e656 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,6 +5,7 @@ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> + <%= yield :head %> diff --git a/app/views/tables/show.html.haml b/app/views/tables/show.html.haml index 006620f..39ad4bb 100644 --- a/app/views/tables/show.html.haml +++ b/app/views/tables/show.html.haml @@ -1,3 +1,6 @@ +- unless current_user.soft_token == @game.controlling_player.soft_token + - content_for :head do + %meta{:content => "5", "http-equiv" => "refresh"}/ - if policy(@table).update? .owner-controls = link_to 'Edit', edit_table_path(@table)