]> git.openstreetmap.org Git - rails.git/blob - app/models/diary_entry.rb
Added tests for changeset upload code. Refactored diff reading code and put it into...
[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_length_of :title, :within => 1..255
7   validates_length_of :language, :within => 2..3
8   validates_numericality_of :latitude, :allow_nil => true
9   validates_numericality_of :longitude, :allow_nil => true
10   validates_associated :user
11 end