diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-27 17:54:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-27 17:54:09 +0000 |
commit | a774c5c48b5e596770340b6ac27ea9f0a1e1141f (patch) | |
tree | 7c0ab261c09324cbef711cba9ab3400d3c610cc2 /app/models/document.rb | |
parent | 1721376542af256263d605a16c3981eca9e3733a (diff) | |
download | redmine-a774c5c48b5e596770340b6ac27ea9f0a1e1141f.tar.gz redmine-a774c5c48b5e596770340b6ac27ea9f0a1e1141f.zip |
Activity refactoring.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1701 e93f8b46-1217-0410-a6f0-8f06a7374b81
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 |