/post_versions: unify standard and revert listings.

This commit is contained in:
evazion
2019-09-28 12:53:45 -05:00
parent 62ec679bfb
commit 609a440d1c
4 changed files with 9 additions and 67 deletions

View File

@@ -1,4 +1,8 @@
module PostVersionsHelper
def post_version_listing
params.dig(:search, :post_id).present? ? :revert : :standard
end
def post_version_diff(post_version)
diff = post_version.diff(post_version.previous)
html = '<span class="diff-list">'