Files
nairobi/app/views/layouts/_officing_booth.html.erb
Javi Martín a15ff36a22 Apply Rails/SafeNavigation in officing booth view
In commit 9329e4b6e, `try` was added because there was a case where this
partial was rendered and the `current_booth` method didn't exist.
However, that's no longer the case since commit d5c7858f6. Since then,
this partial is only rendered in the officing section, where the
`current_booth` method is defined.

So we can use the safe navigation operator instead of `try`.
2024-06-18 18:27:32 +02:00

6 lines
179 B
Plaintext

<% if current_user.poll_officer? %>
<div id="officing-booth" class="callout info">
<%= t("admin.officing_booth.title", booth: current_booth&.location) %>
</div>
<% end %>