Add soft block button in moderation user view

This commit is contained in:
Carlos Iniesta
2020-10-25 22:26:29 +01:00
committed by Javi Martín
parent 4c8dfb6695
commit 49edd6a9b1
10 changed files with 43 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ class Activity < ApplicationRecord
belongs_to :actionable, -> { with_hidden }, polymorphic: true
belongs_to :user, -> { with_hidden }, inverse_of: :activities
VALID_ACTIONS = %w[hide block restore valuate email].freeze
VALID_ACTIONS = %w[hide soft_block block restore valuate email].freeze
validates :action, inclusion: { in: VALID_ACTIONS }