Add comments translations
Co-Authored-By: Sebastia <sebastia.roig@gmail.com>
This commit is contained in:
committed by
voodoorai2000
parent
096a9f6bb8
commit
158af0217d
@@ -18,7 +18,10 @@ class Comment < ApplicationRecord
|
||||
|
||||
attr_accessor :as_moderator, :as_administrator
|
||||
|
||||
validates :body, presence: true
|
||||
translates :body, touch: true
|
||||
include Globalizable
|
||||
|
||||
validates_translation :body, presence: true
|
||||
validates :user, presence: true
|
||||
|
||||
validates :commentable_type, inclusion: { in: COMMENTABLE_TYPES }
|
||||
|
||||
Reference in New Issue
Block a user