Make comments available to RFC

This commit is contained in:
Maximilian Grundke
2017-06-09 14:39:33 +02:00
parent e4d1f57164
commit 30375a4909
2 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,8 @@ class RequestForComment < ActiveRecord::Base
belongs_to :exercise
belongs_to :file, class_name: 'CodeOcean::File'
has_many :comments, through: :submission
scope :unsolved, -> { where(solved: [false, nil]) }
def self.last_per_user(n = 5)