From 50afe59306ec41a4fd74b01ca001734840adca8d Mon Sep 17 00:00:00 2001 From: romanrizzi Date: Fri, 9 Aug 2019 11:13:09 -0300 Subject: [PATCH] FIX: Use #dup instead of #+@ since content could be an instance of Nokogiri::XML::Element. --- app/models/topic_embed.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb index 973b4896c51..8219e30e834 100644 --- a/app/models/topic_embed.rb +++ b/app/models/topic_embed.rb @@ -37,7 +37,7 @@ class TopicEmbed < ActiveRecord::Base contents = first_paragraph_from(contents) end contents ||= '' - contents = +contents << imported_from_html(url) + contents = contents.dup << imported_from_html(url) url = normalize_url(url)