Fix #3641: Can't add tags via Add Commentary dialog.
This commit is contained in:
@@ -108,7 +108,7 @@ class ArtistCommentary < ApplicationRecord
|
|||||||
post.add_tag("check_commentary")
|
post.add_tag("check_commentary")
|
||||||
end
|
end
|
||||||
|
|
||||||
post.save if post.saved_change_to_tag_string?
|
post.save if post.tag_string_changed?
|
||||||
end
|
end
|
||||||
|
|
||||||
module VersionMethods
|
module VersionMethods
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ class ArtistCommentaryTest < ActiveSupport::TestCase
|
|||||||
@artcomm.reload
|
@artcomm.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "add tags if requested" do
|
||||||
|
@artcomm.update(translated_title: "bar", add_commentary_tag: "1")
|
||||||
|
assert_equal(true, @post.reload.has_tag?("commentary"))
|
||||||
|
end
|
||||||
|
|
||||||
should "not create new version if nothing changed" do
|
should "not create new version if nothing changed" do
|
||||||
@artcomm.save
|
@artcomm.save
|
||||||
assert_equal(1, @post.artist_commentary.versions.size)
|
assert_equal(1, @post.artist_commentary.versions.size)
|
||||||
|
|||||||
Reference in New Issue
Block a user