summaryrefslogtreecommitdiffstats
path: root/app/models/comment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/comment.rb')
-rw-r--r--app/models/comment.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 701f0344e..4b7e098f1 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -16,8 +16,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class Comment < ActiveRecord::Base
+ include Redmine::SafeAttributes
belongs_to :commented, :polymorphic => true, :counter_cache => true
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
validates_presence_of :commented, :author, :comments
+
+ safe_attributes 'comments'
end