]> git.openstreetmap.org Git - rails.git/commitdiff
Only validate the presence of a description on create as we have old
authorTom Hughes <tom@compton.nu>
Sun, 10 Jun 2007 09:08:22 +0000 (09:08 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 10 Jun 2007 09:08:22 +0000 (09:08 +0000)
records in the database with no description.

app/models/trace.rb

index 4f21c8b25e29277d3c167a55e860011232793693..11f912b693aa2f16977544ef3b7eacf63165cb9b 100644 (file)
@@ -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]