diff options
author | Rémy Coutable <remy@rymai.me> | 2015-09-29 18:08:55 +0200 |
---|---|---|
committer | rymai <remy@rymai.me> | 2015-09-29 21:47:01 +0200 |
commit | ea72d53ec083676ee1171e97c0869132f360d0c9 (patch) | |
tree | d512e83b668cf9223bab25c5f5dd6b715a82b204 /app/models/abuse_report.rb | |
parent | 5f95a5e070c76c582a2b394377b0f350f4b1cff9 (diff) | |
download | gitlab-ce-ea72d53ec083676ee1171e97c0869132f360d0c9.tar.gz |
Streamline the "Report button"rymai/gitlab-ce-disable-report-button-if-already-reported
This simplifies the "Report button" to not use open a dropdown and
adds a tooltip on this button.
This also removes an extra spec and adds missing specs.
Diffstat (limited to 'app/models/abuse_report.rb')
-rw-r--r-- | app/models/abuse_report.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/abuse_report.rb b/app/models/abuse_report.rb index 07c87a7fe87..89b3116b9f2 100644 --- a/app/models/abuse_report.rb +++ b/app/models/abuse_report.rb @@ -11,11 +11,11 @@ # class AbuseReport < ActiveRecord::Base - belongs_to :reporter, class_name: "User" + belongs_to :reporter, class_name: 'User' belongs_to :user validates :reporter, presence: true validates :user, presence: true validates :message, presence: true - validates :user_id, uniqueness: { scope: :reporter_id } + validates :user_id, uniqueness: true end |