2017-10-26 16:29:36 -04:00
|
|
|
desc 'Export all the categories'
|
2017-11-11 08:22:22 -05:00
|
|
|
task 'export:categories', [:category_ids] => [:environment] do |_, args|
|
2017-10-26 16:29:36 -04:00
|
|
|
require "import_export/import_export"
|
2018-05-28 09:49:26 -04:00
|
|
|
ids = args[:category_ids].split(" ")
|
2017-10-26 16:29:36 -04:00
|
|
|
|
2018-05-28 09:51:06 -04:00
|
|
|
ImportExport.export_categories(ids)
|
2017-11-11 08:22:22 -05:00
|
|
|
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/import_export"
|
|
|
|
|
|
|
|
ImportExport.export_category_structure(args[:include_group_users], args[:file_name])
|
2017-10-26 16:29:36 -04:00
|
|
|
puts "", "Done", ""
|
|
|
|
end
|