Added mysql error message.
This commit is contained in:
parent
ef621269f9
commit
58396da9ae
1 changed files with 1 additions and 1 deletions
|
@ -393,7 +393,7 @@ class ApplicationController < ActionController::Base
|
||||||
data = {
|
data = {
|
||||||
error: error
|
error: error
|
||||||
}
|
}
|
||||||
if error =~ /(already exists|duplicate key)/i
|
if error =~ /(already exists|duplicate key|duplicate entry)/i
|
||||||
data[:error_human] = 'Object already exists!'
|
data[:error_human] = 'Object already exists!'
|
||||||
end
|
end
|
||||||
data
|
data
|
||||||
|
|
Loading…
Reference in a new issue