]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/diary_entry.rb
Removing the in_world test from the model since it is included in the geo_record...
[rails.git] / app / models / diary_entry.rb
index 2da92d400648a564eecc1bdd66c6841190b6245f..5b3d34766d06a17e86fc2a61577829c9e7bc8f41 100644 (file)
@@ -1,2 +1,9 @@
 class DiaryEntry < ActiveRecord::Base
+  belongs_to :user
+  has_many :diary_comments, :order => "id"
+
+  validates_presence_of :title, :body
+  validates_numericality_of :latitude, :allow_nil => true
+  validates_numericality_of :longitude, :allow_nil => true
+  validates_associated :user
 end