FIX: better error message when trying to approve post for closed/deleted topic

This commit is contained in:
Arpit Jalan
2016-06-24 14:06:27 +05:30
parent 789a6aeb21
commit 3232ce8265
2 changed files with 11 additions and 7 deletions

View File

@@ -70,7 +70,7 @@ class QueuedPost < ActiveRecord::Base
created_post = creator.create
unless created_post && creator.errors.blank?
raise StandardError, "Failed to create post #{raw[0..100]} #{creator.errors.full_messages.inspect}"
raise StandardError.new(creator.errors.full_messages.join(" "))
end
end