]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/diary_comment.rb
More resourceful routing for nodes, ways, relations and changesets controllers
[rails.git] / app / models / diary_comment.rb
index 472129b1b6e174c0a525ff70a648b9d78b8904f9..ade7a64ea317fd38d00dc5b5ef6d5318068bc904 100644 (file)
@@ -2,9 +2,9 @@
 #
 # Table name: diary_comments
 #
-#  id             :bigint(8)        not null, primary key
-#  diary_entry_id :bigint(8)        not null
-#  user_id        :bigint(8)        not null
+#  id             :integer          not null, primary key
+#  diary_entry_id :integer          not null
+#  user_id        :integer          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, :invalid_chars => true
+  validates :body, :presence => true, :characters => true
   validates :diary_entry, :user, :associated => true
 
   after_save :spam_check