From 09dbf09b5fa6d106a57cdb601c6ed6c23e00f7dd Mon Sep 17 00:00:00 2001 From: David Gay Date: Thu, 27 May 2021 19:24:12 -0400 Subject: Make timer more robust, and `stop_activity` if you can't do it --- app/views/look/_results.html.erb | 2 +- app/views/look/show.html.erb | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/look/_results.html.erb b/app/views/look/_results.html.erb index 36e8103..8b5466e 100644 --- a/app/views/look/_results.html.erb +++ b/app/views/look/_results.html.erb @@ -21,7 +21,7 @@ <% when "message" %>

<%= result[:body] %>

<% when "error" %> -

<%= result[:message] %>

+

<%= result[:message] %>

<% end %> <% end %> diff --git a/app/views/look/show.html.erb b/app/views/look/show.html.erb index a0c1bd7..f5ae417 100644 --- a/app/views/look/show.html.erb +++ b/app/views/look/show.html.erb @@ -1,10 +1,15 @@ -

<%= current_char.activity.name %>

-

<%= current_char.activity.description %>

+<% if current_char.activity %> +

<%= current_char.activity.name %>

+

<%= current_char.activity.description %>

-
-
+
+
-
- <%= render "timer" %> -
+
+ <%= render "timer" %> +
+<% else %> +

You're not currently doing anything. Maybe you'd like to + <%= link_to "go somewhere", locations_path %>?

+<% end %> -- cgit v1.2.3