From 81021a108151270e1aef4570ded6f7aeed901722 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 10 Jun 2007 09:08:22 +0000 Subject: [PATCH] Only validate the presence of a description on create as we have old records in the database with no description. --- app/models/trace.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/trace.rb b/app/models/trace.rb index 4f21c8b25..11f912b69 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -1,7 +1,8 @@ class Trace < ActiveRecord::Base set_table_name 'gpx_files' - validates_presence_of :user_id, :name, :public, :description, :timestamp + validates_presence_of :user_id, :name, :public, :timestamp + validates_presence_of :description, :on => :create # validates_numericality_of :latitude, :longitude validates_inclusion_of :inserted, :in => [ true, false] -- 2.43.2