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 :post
|
||||||
belongs_to :user
|
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
|
validates_inclusion_of :reason, in: REASONS
|
||||||
validate :validate_disapproval
|
validate :validate_disapproval
|
||||||
|
|
||||||
|
|||||||
@@ -55,13 +55,9 @@ en:
|
|||||||
creator: "You"
|
creator: "You"
|
||||||
creator_id: "You"
|
creator_id: "You"
|
||||||
post_disapproval:
|
post_disapproval:
|
||||||
post: "You"
|
user: "You"
|
||||||
post_id: "You"
|
user_id: "You"
|
||||||
comment:
|
|
||||||
post: "You"
|
|
||||||
post_id: "You"
|
|
||||||
comment_vote:
|
comment_vote:
|
||||||
comment: "You"
|
|
||||||
user_id: "You"
|
user_id: "You"
|
||||||
upload:
|
upload:
|
||||||
uploader: "You"
|
uploader: "You"
|
||||||
|
|||||||
Reference in New Issue
Block a user