Fix #4404: Wrong error message when disapproving an already active post.

This commit is contained in:
evazion
2020-04-15 01:10:16 -05:00
parent 432668ddef
commit 3aa80c8dc4
2 changed files with 3 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ class PostDisapproval < ApplicationRecord
belongs_to :post
belongs_to :user
validates_uniqueness_of :post_id, :scope => [:user_id], :message => "have already hidden this post"
validates :user, uniqueness: { scope: :post, message: "have already hidden this post" }
validates_inclusion_of :reason, in: REASONS
validate :validate_disapproval

View File

@@ -55,13 +55,9 @@ en:
creator: "You"
creator_id: "You"
post_disapproval:
post: "You"
post_id: "You"
comment:
post: "You"
post_id: "You"
user: "You"
user_id: "You"
comment_vote:
comment: "You"
user_id: "You"
upload:
uploader: "You"