posts: add "general" rating; rename "safe" rating to "sensitive".

* Add "general" rating.
* Rename "safe" rating to "sensitive".
* Change safe mode to include both rating:s and rating:g.
* Treat rating:safe as a synonym for rating:sensitive.
* Link "howto:rate" in the post edit form.
This commit is contained in:
evazion
2022-05-22 12:08:46 -05:00
parent d346adabc9
commit 81bd86d202
11 changed files with 62 additions and 25 deletions

View File

@@ -753,15 +753,18 @@ class PostQueryBuilderTest < ActiveSupport::TestCase
end
should "return posts for the is:<rating> metatag" do
g = create(:post, rating: "g")
s = create(:post, rating: "s")
q = create(:post, rating: "q")
e = create(:post, rating: "e")
all = [e, q, s]
all = [e, q, s, g]
assert_tag_match([g], "is:general")
assert_tag_match([s], "is:safe")
assert_tag_match([s], "is:sensitive")
assert_tag_match([q], "is:questionable")
assert_tag_match([e], "is:explicit")
assert_tag_match([s], "is:sfw")
assert_tag_match([s, g], "is:sfw")
assert_tag_match([e, q], "is:nsfw")
end