diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-01-18 00:17:27 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-01-18 00:17:27 +0000 |
commit | 26d28ea0b440aefef6b1677d02e2c842c5f5d376 (patch) | |
tree | 96d73cff6acc74f0a03ee3451a0c53198fa5497c /app | |
parent | a6e073fa9b0d78181609962b269f8d9d240f99ac (diff) | |
parent | d633755350f1549d4643ac527980c9b28aa1287c (diff) | |
download | gitlab-ce-26d28ea0b440aefef6b1677d02e2c842c5f5d376.tar.gz |
Merge branch 'rs-abuse-report-validation' into 'master'
Use a more sensible message for the AbuseReport uniqueness validation
Previously it was "user has already been taken", when really we were
saying the user has already been reported.
See merge request !2461
Diffstat (limited to 'app')
-rw-r--r-- | app/models/abuse_report.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/abuse_report.rb b/app/models/abuse_report.rb index 2bc15c60d57..cc59aa4e911 100644 --- a/app/models/abuse_report.rb +++ b/app/models/abuse_report.rb @@ -17,7 +17,7 @@ class AbuseReport < ActiveRecord::Base validates :reporter, presence: true validates :user, presence: true validates :message, presence: true - validates :user_id, uniqueness: true + validates :user_id, uniqueness: { message: 'has already been reported' } def remove_user user.block |