diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-09 16:54:46 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-09 16:54:46 +0000 |
commit | 5d2899ee1b3e00d0cf43521182b1244dfc3cfe9f (patch) | |
tree | eb64711c0150fafb698da9d92eb0d6735a5461cf /app/models/document.rb | |
parent | 2b6e332318a3e0a9489d20280010bb2d00206d95 (diff) | |
download | redmine-5d2899ee1b3e00d0cf43521182b1244dfc3cfe9f.tar.gz redmine-5d2899ee1b3e00d0cf43521182b1244dfc3cfe9f.zip |
AttachmentsController now handles attachments deletion.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2116 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/document.rb')
-rw-r--r-- | app/models/document.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/document.rb b/app/models/document.rb index 627a2418f..95c3a52c8 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -18,7 +18,7 @@ class Document < ActiveRecord::Base belongs_to :project belongs_to :category, :class_name => "Enumeration", :foreign_key => "category_id" - has_many :attachments, :as => :container, :dependent => :destroy + acts_as_attachable :delete_permission => :manage_documents acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project acts_as_event :title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"}, |