X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c2f23fea6a7821a4ad4c97fd65744b138ec86267..10999cfc5e6f64f1b6d81ddb4a2f751c694bcbc5:/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