From af24c7f9c9fd0539d6a14a38c9f7f2408378d8a3 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 90bc2e27..910e656c 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 006620fe..39ad4bb4 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)