From: Tom Hughes Date: Sun, 10 Jun 2007 09:08:22 +0000 (+0000) Subject: Only validate the presence of a description on create as we have old X-Git-Tag: live~8387 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/81021a108151270e1aef4570ded6f7aeed901722?ds=sidebyside Only validate the presence of a description on create as we have old records in the database with no description. --- 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]