diff options
author | David Gay <david@davidgay.org> | 2021-05-20 18:09:11 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-20 18:09:26 -0400 |
commit | 71f15b6534ffa7ba159d5e4076d59bb7961089a9 (patch) | |
tree | c762e4e7044f2daf97642e239397955789687635 /app/views | |
parent | fea8b6bb7aef2d69c0641b19abc0f05eb89e789e (diff) |
Refactor item xp awards data structure
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/activities/_results.html.erb | 2 |
1 files changed, 1 insertions, 1 deletions
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" %> <p>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 %> </p> |