X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/81241b30835fe090ebc9f511d1954a5c511c94ca..1cf8fec58d2e32d431aaee51213d738241e39e66:/app/models/diary_comment.rb diff --git a/app/models/diary_comment.rb b/app/models/diary_comment.rb index 63eae3f21..4ae21be88 100644 --- a/app/models/diary_comment.rb +++ b/app/models/diary_comment.rb @@ -2,9 +2,9 @@ # # Table name: diary_comments # -# id :integer not null, primary key -# diary_entry_id :integer not null -# user_id :integer not null +# id :bigint(8) not null, primary key +# diary_entry_id :bigint(8) not null +# user_id :bigint(8) not null # body :text not null # created_at :datetime not null # updated_at :datetime not null @@ -28,7 +28,7 @@ class DiaryComment < ActiveRecord::Base scope :visible, -> { where(:visible => true) } - validates :body, :presence => true + validates :body, :presence => true, :characters => true validates :diary_entry, :user, :associated => true after_save :spam_check