2
0
Fork 0
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:
Robin Ward 2014-09-10 14:27:18 -04:00
parent d15b609e0a
commit f4f54fd49b
3 changed files with 116 additions and 2 deletions

View file

@ -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