]> git.openstreetmap.org Git - rails.git/blob - app/models/diary_entry.rb
Updating the cycle map to use all zoom levels as per Andy Allan's message.
[rails.git] / app / models / diary_entry.rb
1 class DiaryEntry < ActiveRecord::Base
2   belongs_to :user
3   has_many :diary_comments, :include => :user,
4                             :conditions => "users.visible = 1",
5                             :order => "diary_comments.id"
6
7   validates_presence_of :title, :body
8   validates_numericality_of :latitude, :allow_nil => true
9   validates_numericality_of :longitude, :allow_nil => true
10   validates_associated :user
11 end