]> git.openstreetmap.org Git - rails.git/blob - app/models/diary_entry.rb
5b3d34766d06a17e86fc2a61577829c9e7bc8f41
[rails.git] / app / models / diary_entry.rb
1 class DiaryEntry < ActiveRecord::Base
2   belongs_to :user
3   has_many :diary_comments, :order => "id"
4
5   validates_presence_of :title, :body
6   validates_numericality_of :latitude, :allow_nil => true
7   validates_numericality_of :longitude, :allow_nil => true
8   validates_associated :user
9 end