mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
First stab at Importer for Drupal QA
This commit is contained in:
parent
d15b609e0a
commit
f4f54fd49b
3 changed files with 116 additions and 2 deletions
|
@ -322,6 +322,12 @@ class ImportScripts::Base
|
|||
def create_categories(results)
|
||||
results.each do |c|
|
||||
params = yield(c)
|
||||
|
||||
# Basic massaging on the category name
|
||||
params[:name] = "Blank" if params[:name].blank?
|
||||
params[:name].strip!
|
||||
params[:name] = params[:name][0..49]
|
||||
|
||||
puts "\t#{params[:name]}"
|
||||
|
||||
# make sure categories don't go more than 2 levels deep
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue