Upgrade Rails to version 5.2.1 and adopt code & specs where necessary

Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
This commit is contained in:
Sebastian Serth
2018-09-13 12:21:53 +02:00
parent 108190c242
commit de52db89f0
128 changed files with 786 additions and 422 deletions

View File

@ -15,14 +15,14 @@ class ErrorsController < ApplicationController
if hint
render(json: {hint: hint})
else
render(nothing: true, status: @error.save ? :created : :unprocessable_entity)
head (@error.save ? :created : :unprocessable_entity)
end
end
end
end
def error_params
params[:error].permit(:message, :submission_id).merge(execution_environment_id: @execution_environment.id)
params[:error].permit(:message, :submission_id).merge(execution_environment_id: @execution_environment.id) if params[:error].present?
end
private :error_params