redirect to RFCs on max score: redirect users to their own RFCs if they are open, fixed wrong usage of user_id (external_id is not used in RFCs, normal id has to be used!).
This commit is contained in:
@ -82,6 +82,7 @@ class RequestForCommentsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def request_for_comment_params
|
||||
# we are using the current_user.id here, since internal users are not able to create comments. The external_user.id is a primary key and does not require the consumer_id to be unique.
|
||||
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
|
||||
|
Reference in New Issue
Block a user