projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24ee561
)
Only validate the presence of a description on create as we have old
author
Tom Hughes
<tom@compton.nu>
Sun, 10 Jun 2007 09:08:22 +0000
(09:08 +0000)
committer
Tom 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
patch
|
blob
|
history
diff --git
a/app/models/trace.rb
b/app/models/trace.rb
index 4f21c8b25e29277d3c167a55e860011232793693..11f912b693aa2f16977544ef3b7eacf63165cb9b 100644
(file)
--- 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]