mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 08:37:16 +08:00
Enable Lint/ShadowingOuterLocalVariable
for Rubocop.
This commit is contained in:
@ -97,9 +97,14 @@ module ImportExport
|
||||
topic_data[:posts] = []
|
||||
|
||||
topic.ordered_posts.find_each do |post|
|
||||
h = POST_ATTRS.inject({}) { |h, a| h[a] = post.send(a); h; }
|
||||
h[:raw] = h[:raw].gsub('src="/uploads', "src=\"#{Discourse.base_url_no_prefix}/uploads")
|
||||
topic_data[:posts] << h
|
||||
attributes = POST_ATTRS.inject({}) { |h, a| h[a] = post.send(a); h; }
|
||||
|
||||
attributes[:raw] = attributes[:raw].gsub(
|
||||
'src="/uploads',
|
||||
"src=\"#{Discourse.base_url_no_prefix}/uploads"
|
||||
)
|
||||
|
||||
topic_data[:posts] << attributes
|
||||
end
|
||||
|
||||
data << topic_data
|
||||
|
Reference in New Issue
Block a user