In commit9329e4b6e, `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 commitd5c7858f6. 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`.
6 lines
179 B
Plaintext
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 %>
|