From 0999001f5316b4d2699a0b5d83055b17c6d7eebb Mon Sep 17 00:00:00 2001 From: Joschka Schulz Date: Wed, 2 Oct 2024 01:16:17 +0200 Subject: [PATCH] fix(#969): changed administrate api After saving an event an error will show up. This error happens on the show page of the event. It seems like the administrate api has changed and the attributes are now nested inside a hash with no given key. This commit returns the correct attributes for the show page and resolves the attributes correctly. --- app/views/admin/events/show.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/admin/events/show.html.erb b/app/views/admin/events/show.html.erb index 15ba6d8e4..12c424cef 100644 --- a/app/views/admin/events/show.html.erb +++ b/app/views/admin/events/show.html.erb @@ -69,10 +69,10 @@ as well as a link to its edit page.
- <% page.attributes.each do |attribute| %> -
+ <% page.attributes.values[0].each do |attribute| %> +
<%= t( - "helpers.label.#{resource_name}.#{attribute.name}", + "helpers.label.#{resource_name}.#{attribute&.name}", default: attribute.name.titleize, ) %>