Fix #4404: Wrong error message when disapproving an already active post.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user