openstreetmap-website/app/models/issue_comment.rb

8 lines
255 B
Ruby

class IssueComment < ActiveRecord::Base
belongs_to :issue
belongs_to :user, :class_name => "User", :foreign_key => :commenter_user_id
validates :body, :presence => true
validates :user, :presence => true
validates :issue, :presence => true
end