Improve error messages.

This commit is contained in:
Guo Xiang Tan 2017-04-04 17:19:14 +08:00
parent 69661be500
commit e4d7e4fbe3

View File

@ -182,7 +182,7 @@ class PostCreator
create
if !self.errors.full_messages.empty?
raise ActiveRecord::RecordNotSaved.new("Failed to create post", self)
raise ActiveRecord::RecordNotSaved.new("Failed to create post: #{self.errors.full_messages}")
end
@post