fixes #900 (both + and -)

This commit is contained in:
ToksT
2013-03-28 14:03:12 -03:00
parent 1194d401df
commit 10292f3544

View File

@@ -3,10 +3,10 @@ module PostVersionsHelper
diff = post_version.diff(post_version.previous) diff = post_version.diff(post_version.previous)
html = [] html = []
diff[:added_tags].each do |tag| diff[:added_tags].each do |tag|
html << '<ins>' + link_to(tag, posts_path(:tags => tag)) + '</ins>' html << '<ins>+' + link_to(tag, posts_path(:tags => tag)) + '</ins>'
end end
diff[:removed_tags].each do |tag| diff[:removed_tags].each do |tag|
html << '<del>' + link_to(tag, posts_path(:tags => tag)) + '</del>' html << '<del>-' + link_to(tag, posts_path(:tags => tag)) + '</del>'
end end
diff[:unchanged_tags].each do |tag| diff[:unchanged_tags].each do |tag|
html << '<span>' + link_to(tag, posts_path(:tags => tag)) + '</span>' html << '<span>' + link_to(tag, posts_path(:tags => tag)) + '</span>'