Added mysql error message.

This commit is contained in:
Martin Edenhofer 2016-02-17 15:15:26 +01:00
parent ef621269f9
commit 58396da9ae

View file

@ -393,7 +393,7 @@ class ApplicationController < ActionController::Base
data = {
error: error
}
if error =~ /(already exists|duplicate key)/i
if error =~ /(already exists|duplicate key|duplicate entry)/i
data[:error_human] = 'Object already exists!'
end
data