]> git.openstreetmap.org Git - rails.git/blob - app/models/issue_comment.rb
bbc15aefa98caaeed54ef17f013950aff47aad81
[rails.git] / app / models / issue_comment.rb
1 # == Schema Information
2 #
3 # Table name: issue_comments
4 #
5 #  id                :integer          not null, primary key
6 #  issue_id          :integer          not null
7 #  commenter_user_id :integer          not null
8 #  body              :text             not null
9 #  reassign          :boolean
10 #  created_at        :datetime         not null
11 #  updated_at        :datetime         not null
12 #
13 # Indexes
14 #
15 #  index_issue_comments_on_commenter_user_id  (commenter_user_id)
16 #  index_issue_comments_on_issue_id           (issue_id)
17 #
18 # Foreign Keys
19 #
20 #  issue_comments_commenter_user_id  (commenter_user_id => users.id) ON DELETE => cascade
21 #  issue_comments_issue_id_fkey      (issue_id => issues.id) ON DELETE => cascade
22 #
23
24 class IssueComment < ActiveRecord::Base
25   belongs_to :issue
26   belongs_to :user, :class_name => "User", :foreign_key => :commenter_user_id
27
28   validates :body, :presence => true
29   validates :user, :presence => true
30   validates :issue, :presence => true
31 end