Skip to content

Commit

Permalink
fix(#969): changed administrate api
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JoschkaSchulz committed Oct 1, 2024
1 parent 5e39a81 commit 0999001
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/admin/events/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ as well as a link to its edit page.

<section class="main-content__body">
<dl>
<% page.attributes.each do |attribute| %>
<dt class="attribute-label" id="<%= attribute.name %>">
<% page.attributes.values[0].each do |attribute| %>
<dt class="attribute-label" id="<%= attribute&.name %>">
<%= t(
"helpers.label.#{resource_name}.#{attribute.name}",
"helpers.label.#{resource_name}.#{attribute&.name}",
default: attribute.name.titleize,
) %>
</dt>
Expand Down

0 comments on commit 0999001

Please sign in to comment.