1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-12 04:03:08 +00:00
redmine/scm/app/models/comment.rb
Jean-Philippe Lang fa820c0224 SCM branch
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@101 e93f8b46-1217-0410-a6f0-8f06a7374b81
2006-12-18 17:24:21 +00:00

7 lines
237 B
Ruby

class Comment < ActiveRecord::Base
belongs_to :commented, :polymorphic => true, :counter_cache => true
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
validates_presence_of :commented, :author, :comment
end