feedbacks: fix mod action when feedback is deleted.

Fix feedbacks logging an "updated user feedback" mod action instead of a "deleted user feedback"
mod action when a feedback was deleted.
This commit is contained in:
evazion
2022-11-20 15:08:43 -06:00
parent d99da72744
commit cc13c5cd57
4 changed files with 19 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
<%# record, interval %>
<% if record.respond_to?(:updater) && record.updater_id != record.creator_id %>
<% if record.respond_to?(:updater) && record.respond_to?(:updater_id) && record.updater_id != record.creator_id %>
<p class="fineprint edit-notice">Updated by <%= link_to_user record.updater %> <%= time_ago_in_words_tagged(record.updated_at) %></p>
<% elsif record.updated_at - record.created_at > (local_assigns[:interval] || 5.minutes) %>
<p class="fineprint edit-notice">Updated <%= time_ago_in_words_tagged(record.updated_at) %></p>