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

@ -86,11 +86,11 @@ class ExecutionEnvironmentsController < ApplicationController
working_time_statistics = {}
user_statistics = {}
ActiveRecord::Base.connection.execute(working_time_query).each do |tuple|
ApplicationRecord.connection.execute(working_time_query).each do |tuple|
working_time_statistics[tuple["exercise_id"].to_i] = tuple
end
ActiveRecord::Base.connection.execute(user_query).each do |tuple|
ApplicationRecord.connection.execute(user_query).each do |tuple|
user_statistics[tuple["exercise_id"].to_i] = tuple
end
@ -101,7 +101,7 @@ class ExecutionEnvironmentsController < ApplicationController
end
def execution_environment_params
params[:execution_environment].permit(:docker_image, :exposed_ports, :editor_mode, :file_extension, :file_type_id, :help, :indent_size, :memory_limit, :name, :network_enabled, :permitted_execution_time, :pool_size, :run_command, :test_command, :testing_framework).merge(user_id: current_user.id, user_type: current_user.class.name)
params[:execution_environment].permit(:docker_image, :exposed_ports, :editor_mode, :file_extension, :file_type_id, :help, :indent_size, :memory_limit, :name, :network_enabled, :permitted_execution_time, :pool_size, :run_command, :test_command, :testing_framework).merge(user_id: current_user.id, user_type: current_user.class.name) if params[:execution_environment].present?
end
private :execution_environment_params