Apply Rails/SafeNavigation in officing booth view
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`.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<% if current_user.poll_officer? %>
|
||||
<div id="officing-booth" class="callout info">
|
||||
<%= t("admin.officing_booth.title", booth: try(:current_booth)&.location) %>
|
||||
<%= t("admin.officing_booth.title", booth: current_booth&.location) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user