diff options
Diffstat (limited to 'app/models/document.rb')
-rw-r--r-- | app/models/document.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/document.rb b/app/models/document.rb index 9e2818fc7..627a2418f 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -24,7 +24,8 @@ class Document < ActiveRecord::Base acts_as_event :title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"}, :author => Proc.new {|o| (a = o.attachments.find(:first, :order => "#{Attachment.table_name}.created_on ASC")) ? a.author : nil }, :url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}} - + acts_as_activity_provider :find_options => {:include => :project} + validates_presence_of :project, :title, :category validates_length_of :title, :maximum => 60 end |