X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c2f23fea6a7821a4ad4c97fd65744b138ec86267..7364f40fca5c87bda71f80b58c3403dcbc24fab9:/app/models/diary_comment.rb diff --git a/app/models/diary_comment.rb b/app/models/diary_comment.rb index 472129b1b..05f5044c5 100644 --- a/app/models/diary_comment.rb +++ b/app/models/diary_comment.rb @@ -22,13 +22,13 @@ # diary_comments_user_id_fkey (user_id => users.id) # -class DiaryComment < ActiveRecord::Base +class DiaryComment < ApplicationRecord belongs_to :user belongs_to :diary_entry scope :visible, -> { where(:visible => true) } - validates :body, :presence => true, :invalid_chars => true + validates :body, :presence => true, :characters => true validates :diary_entry, :user, :associated => true after_save :spam_check