post versions: fix undo action.

This commit is contained in:
evazion
2020-03-21 17:20:11 -05:00
parent ca27929249
commit 41ab3c9f63
3 changed files with 8 additions and 7 deletions

View File

@@ -31,7 +31,7 @@
</div>
<% end %>
<% t.column do |post_version| %>
<% if policy(post_version).can_undo? %>
<% if policy(post_version).undo? %>
<%= link_to "Undo", undo_post_version_path(post_version), method: :put, remote: true, class: "post-version-undo-link" %>
<% end %>
<% if listing_type(:post_id) == :revert && policy(post_version.post).revert? %>