Make comments available to RFC
This commit is contained in:
@ -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)
|
||||
|
@ -8,6 +8,7 @@ class Submission < ActiveRecord::Base
|
||||
belongs_to :exercise
|
||||
|
||||
has_many :testruns
|
||||
has_many :comments, through: :files
|
||||
|
||||
delegate :execution_environment, to: :exercise
|
||||
|
||||
|
Reference in New Issue
Block a user