initial working version of attachments.
[kwestie.git] / app / models / comment.rb
blobaeebd8d2001ff90fc1192996fb19ae0588b7b1ef
1 class Comment < ActiveRecord::Base
2   usesguid
4   belongs_to :issue
5   belongs_to :created_by, :class_name => "User", :foreign_key => "created_by"
7   has_many :attachments, :class_name => "Attachment", :foreign_key => "comment_id", :dependent => :destroy
9   validates_presence_of :description
11   validates_associated :issue
13 end