discourse/lib/tasks/export.rake
Krzysztof Kotlarek f34a0141c7 FIX: Correct path to ImportExport module (#8227)
During the move from Classic autoloader to Zeitwerk import_export module was moved to correct file name convention.
427d54b2b0 (diff-d896ec33b95afb7fae9f8bfe73d0580b)

Problem is that export/import is still using old path to require that module

Meta: https://meta.discourse.org/t/topic-and-category-export-import/38930/40
2019-10-23 17:27:14 +11:00

19 lines
559 B
Ruby

# frozen_string_literal: true
desc 'Export all the categories'
task 'export:categories', [:category_ids] => [:environment] do |_, args|
require "import_export"
ids = args[:category_ids].split(" ")
ImportExport.export_categories(ids)
puts "", "Done", ""
end
desc 'Export only the structure of all categories'
task 'export:category_structure', [:include_group_users, :file_name] => [:environment] do |_, args|
require "import_export"
ImportExport.export_category_structure(args[:include_group_users], args[:file_name])
puts "", "Done", ""
end