X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/38640e0253e8984974d275f2c232eb057ba86c84..5e407dfb34f47e6fbbbf3c11c1a8318256abb5cd:/app/models/diary_comment.rb?ds=sidebyside 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