]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/diary_comment.rb
Merge remote-tracking branch 'upstream/pull/2431'
[rails.git] / app / models / diary_comment.rb
index 472129b1b6e174c0a525ff70a648b9d78b8904f9..05f5044c5db779b232da81bd6e3bbdf0ba31d5b5 100644 (file)
 #  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