From 71f15b6534ffa7ba159d5e4076d59bb7961089a9 Mon Sep 17 00:00:00 2001 From: David Gay Date: Thu, 20 May 2021 18:09:11 -0400 Subject: Refactor item xp awards data structure --- app/views/activities/_results.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/activities/_results.html.erb b/app/views/activities/_results.html.erb index 42f22a3..0e540dd 100644 --- a/app/views/activities/_results.html.erb +++ b/app/views/activities/_results.html.erb @@ -3,7 +3,7 @@ <% case result[:type] %> <% when "item" %>

You got <%= result[:quantity] %> <%= result[:item].name %> - <% if result[:xp].any? %> + <% if result[:xp]&.any? %> (<%= result[:xp].map { |award| "#{award[:amount]} xp #{award[:skill].name}" }.join(", ") %>) <% end %>

-- cgit v1.2.3