diff app/models/news.rb @ 933:d36724ef856a

Merge from branch "cannam_integration"
author Chris Cannam
date Wed, 11 Jul 2012 13:30:13 +0100
parents ec1c49528f36
children bb32da3bea34
line wrap: on
line diff
--- a/app/models/news.rb	Fri May 11 16:13:59 2012 +0100
+++ b/app/models/news.rb	Wed Jul 11 13:30:13 2012 +0100
@@ -16,6 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 class News < ActiveRecord::Base
+  include Redmine::SafeAttributes
   belongs_to :project
   belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
   has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on"
@@ -37,6 +38,8 @@
     :conditions => Project.allowed_to_condition(args.shift || User.current, :view_news, *args)
   }}
 
+  safe_attributes 'title', 'summary', 'description'
+
   def visible?(user=User.current)
     !user.nil? && user.allowed_to?(:view_news, project)
   end