generalize permalink URL in GetSatisfaction import script

This commit is contained in:
Arpit Jalan 2016-09-08 15:01:40 +05:30
parent bade41db42
commit ed0b355e15

View file

@ -343,7 +343,8 @@ class ImportScripts::GetSatisfaction < ImportScripts::Base
tcf = topic.first_post.custom_fields
if tcf && tcf["import_id"]
slug = @topic_slug[tcf["import_id"].to_i]
slug = slug.gsub("https://community.unbounce.com/", "")
# TODO: replace "http://community.example.com/" with the URL of your community
slug = slug.gsub("http://community.example.com/", "")
Permalink.create(url: slug, topic_id: topic.id)
end
end