summaryrefslogtreecommitdiffstats
path: root/app/models/news.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-29 22:39:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-29 22:39:06 +0000
commit24138187eb130b15d5b2b9f7bd6f701b2be6c00a (patch)
tree472ca1d96d538420fc537b743c5ac3b925723044 /app/models/news.rb
parent992aebf6dfe9ca92d43e1022102f5c888631a6f4 (diff)
downloadredmine-24138187eb130b15d5b2b9f7bd6f701b2be6c00a.tar.gz
redmine-24138187eb130b15d5b2b9f7bd6f701b2be6c00a.zip
Allows attachments on news (#1972).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8728 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/news.rb')
-rw-r--r--app/models/news.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/news.rb b/app/models/news.rb
index 763063d13..78dcc0c8c 100644
--- a/app/models/news.rb
+++ b/app/models/news.rb
@@ -24,6 +24,7 @@ class News < ActiveRecord::Base
validates_length_of :title, :maximum => 60
validates_length_of :summary, :maximum => 255
+ acts_as_attachable :delete_permission => :manage_news
acts_as_searchable :columns => ['title', 'summary', "#{table_name}.description"], :include => :project
acts_as_event :url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.id}}
acts_as_activity_provider :find_options => {:include => [:project, :author]},