mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
13 lines
319 B
Ruby
13 lines
319 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Jobs
|
|
class FixEncodedTopicSlugs < ::Jobs::Onceoff
|
|
def execute_onceoff(args)
|
|
return unless SiteSetting.slug_generation_method == "encoded"
|
|
|
|
#Make all slugs nil and let the app regenerate with proper encoded ones
|
|
Topic.update_all(slug: nil)
|
|
end
|
|
end
|
|
end
|