some cleanup of request for comments. Work in progress.

Noticed a flaw when fetching the last submission, which is caused by timezone differences. First step to solve this.
Existing Request for Comments still need to be updated with their current submissionId, the SQL to do that is not yet finished.
This commit is contained in:
Ralf Teusner
2016-07-04 17:44:22 +02:00
parent 6e7c250ad1
commit 223df2ffa8
7 changed files with 57 additions and 33 deletions

View File

@ -82,6 +82,6 @@ class RequestForCommentsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def request_for_comment_params
params.require(:request_for_comment).permit(:exercise_id, :file_id, :question, :requested_at, :solved).merge(user_id: current_user.id, user_type: current_user.class.name)
params.require(:request_for_comment).permit(:exercise_id, :file_id, :question, :requested_at, :solved, :submission_id).merge(user_id: current_user.id, user_type: current_user.class.name)
end
end