This repository has been archived on 2023-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
osr-discourse-src/lib/tasks/export.rake
T
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.
https://github.com/discourse/discourse/commit/427d54b2b00fa94474c0522eaed750452c4e7f43#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