X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/38640e0253e8984974d275f2c232eb057ba86c84..64816e50b57ced52f5fb0082f97b2844e002cf11:/app/models/diary_comment.rb diff --git a/app/models/diary_comment.rb b/app/models/diary_comment.rb index 8a99c7b2c..63eae3f21 100644 --- a/app/models/diary_comment.rb +++ b/app/models/diary_comment.rb @@ -26,6 +26,8 @@ class DiaryComment < ActiveRecord::Base belongs_to :user belongs_to :diary_entry + scope :visible, -> { where(:visible => true) } + validates :body, :presence => true validates :diary_entry, :user, :associated => true