Fix Services::Tumblr#tumblr_template with frozen strings

This commit is contained in:
Benjamin Neff 2017-08-27 18:21:57 +02:00
parent 1b30508c19
commit 723be461cf
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -37,12 +37,11 @@ class Services::Tumblr < Service
end
def tumblr_template(post, url)
html = ''
post.photos.each do |photo|
html << "![photo](#{photo.url(:scaled_full)})\n\n"
end
html << post.message.html(mentioned_people: [])
html << "\n\n[original post](#{url})"
photo_html = post.photos.map {|photo|
"![photo](#{photo.url(:scaled_full)})\n\n"
}.join
"#{photo_html}#{post.message.html(mentioned_people: [])}\n\n[original post](#{url})"
end
def post_opts(post)