diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/activities/_results.html.erb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/activities/_results.html.erb b/app/views/activities/_results.html.erb index ba2abe7..42f22a3 100644 --- a/app/views/activities/_results.html.erb +++ b/app/views/activities/_results.html.erb @@ -1,11 +1,16 @@ <div> <% results.each do |result| %> - <% if result[:type] == "item" %> + <% case result[:type] %> + <% when "item" %> <p>You got <%= result[:quantity] %> <%= result[:item].name %> <% if result[:xp].any? %> (<%= result[:xp].map { |award| "#{award[:amount]} xp #{award[:skill].name}" }.join(", ") %>) <% end %> </p> + <% when "hearth_amenity" %> + <p>You constructed <%= result[:hearth_amenity].name %>.</p> + <% when "error" %> + <p><%= result[:message] %></p> <% end %> <% end %> </div> |