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