post versions: add ability to search post versions by tags.

* Add ability to search /post_versions by added tags, removed tags, or
  changed tags (added or removed).

* Add 'History' link to the sidebar of the /posts index. This is a
  shortcut for a /post_versions search of the current tag.
This commit is contained in:
evazion
2019-09-26 20:28:30 -05:00
parent 12de26d2cf
commit 2b4ee0ee8f
7 changed files with 56 additions and 16 deletions

View File

@@ -66,8 +66,8 @@ class PoolTest < ActiveSupport::TestCase
@post1 = create(:post, tag_string: "pool:pool1")
@post2 = create(:post, tag_string: "pool:pool2")
assert_equal([@pool1.id], Pool.search(post_ids_include: @post1.id).pluck(:id))
assert_equal([@pool2.id, @pool1.id], Pool.search(post_ids_include: "#{@post1.id} #{@post2.id}").pluck(:id))
assert_equal([@pool1.id], Pool.search(post_ids_include_any: @post1.id).pluck(:id))
assert_equal([@pool2.id, @pool1.id], Pool.search(post_ids_include_any: "#{@post1.id} #{@post2.id}").pluck(:id))
end
should "find pools by post id count" do