post versions: add back support for changed_tags param.

Fix broken links on various pages:

* The 'History' link in the sidebar on the post index page.
* The 'History' links on the tags index page.
* The 'Tag History' link in the sidebar on the wiki show page.
This commit is contained in:
evazion
2020-08-13 02:21:38 -05:00
parent 06564b25ca
commit 70f345fd7b
2 changed files with 5 additions and 2 deletions

View File

@@ -47,6 +47,10 @@ class PostVersion < ApplicationRecord
q = super
q = q.search_attributes(params, :updater_id, :post_id, :tags, :added_tags, :removed_tags, :rating, :rating_changed, :parent_id, :parent_changed, :source, :source_changed, :version)
if params[:changed_tags]
q = q.changed_tags_include_all(params[:changed_tags].scan(/[^[:space:]]+/))
end
if params[:all_changed_tags]
q = q.changed_tags_include_all(params[:all_changed_tags].scan(/[^[:space:]]+/))
end