work in progress on duplicate title issue

This commit is contained in:
Ivan Storck 2011-06-02 14:26:18 -07:00
parent 49a49bbab8
commit f254bb9216

View File

@ -35,9 +35,16 @@ module Refinery
raise "Referenced User doesn't exist! Make sure the authors are imported first." \
unless user
begin
is_draft = draft? ? "true" : false
p "creating post " + title + " Draft status: " + is_draft
post = ::BlogPost.create! :title => title, :body => content_formatted, :draft => draft?,
:published_at => post_date, :created_at => post_date, :author => user,
:tag_list => tag_list
rescue Exception => e
# if it's not an activerecord validation error about duplicate title then raise e
p e
end
::BlogPost.transaction do
categories.each do |category|