[Pools] Fix versions index for frozen string literals

This commit is contained in:
Earlopain 2024-02-25 14:15:26 +01:00
parent 5140bea658
commit 19932adc7b
No known key found for this signature in database
GPG Key ID: 48860312319ADF61

View File

@ -1,17 +1,15 @@
module PoolVersionsHelper
def pool_version_posts_diff(pool_version)
html = ""
changes = []
html << pool_version.added_post_ids.map do |post_id|
'<ins><a href="/posts/' + post_id.to_s + '">' + post_id.to_s + '</a></ins>'
end.join(" ")
pool_version.added_post_ids.each do |post_id|
changes << tag.ins(link_to(post_id, post_path(post_id)))
end
html << " "
pool_version.removed_post_ids.each do |post_id|
changes << tag.del(link_to(post_id, post_path(post_id)))
end
html << pool_version.removed_post_ids.map do |post_id|
'<del><a href="/posts/' + post_id.to_s + '">' + post_id.to_s + '</a></del>'
end.join(" ")
return html.html_safe
safe_join(changes, " ")
end
end