diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-06-15 15:10:16 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-06-15 15:10:16 +0300 |
commit | 09c38e46e5e2e3c3f8a1dcda572243966be48b10 (patch) | |
tree | 80f7b0c9abaf0e4deb5f32ba0776af7649c33802 /lib/gitlab/email/handler/base_handler.rb | |
parent | 94178149703f06a7fef958bb4dd964819a02fe13 (diff) |
Only pass item name
Diffstat (limited to 'lib/gitlab/email/handler/base_handler.rb')
-rw-r--r-- | lib/gitlab/email/handler/base_handler.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/email/handler/base_handler.rb b/lib/gitlab/email/handler/base_handler.rb index e6c2705421d..4d74e770b91 100644 --- a/lib/gitlab/email/handler/base_handler.rb +++ b/lib/gitlab/email/handler/base_handler.rb @@ -42,9 +42,12 @@ module Gitlab end.join end - def verify_record!(record, exception, error_title) + def verify_record!(record, exception, name) return if record.persisted? + error_title = + "The #{name} could not be created for the following reasons:" + msg = error_title + record.errors.full_messages.map do |error| "\n\n- #{error}" end.join |