From 39914c83c9129b42d85ff0ec7e981259816e55ee Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Tue, 11 Mar 2014 15:17:46 -0700 Subject: [PATCH] Adding categories/tags --- README.rdoc | 1 - lib/wordpress/post.rb | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 516fa0e..cd1c2bb 100644 --- a/README.rdoc +++ b/README.rdoc @@ -12,7 +12,6 @@ the popular WP blog url structure "YYYY-MM/slug", be warned that Refinery just u So your inner site links will point to the old WP url. == TODO -- categories - tags - attachments - what about wordpress suffixes like -300x290 ? diff --git a/lib/wordpress/post.rb b/lib/wordpress/post.rb index 62a7d98..f751a5f 100644 --- a/lib/wordpress/post.rb +++ b/lib/wordpress/post.rb @@ -54,6 +54,12 @@ module WordPressImport translation.locale = "en" translation.title = title translation.body = content_formatted + + # merge the translation's category list with the wordpress post's + translation.category_list |= categories.collect(&:name) + # and tags + translation.category_list |= tags.collect(&:name) + translation.save post.save