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

@ -4,7 +4,7 @@ class CreateLtiParameters < ActiveRecord::Migration
t.belongs_to :external_users
t.belongs_to :consumers
t.belongs_to :exercises
t.jsonb :lti_parameters, null: false, default: '{}'
t.jsonb :lti_parameters, null: false, default: {}
t.timestamps
end
end

View File

@ -18,7 +18,7 @@ end
# delete all present records
Rails.application.eager_load!
(ActiveRecord::Base.descendants - [ActiveRecord::SchemaMigration]).each(&:delete_all)
(ApplicationRecord.descendants - [ActiveRecord::SchemaMigration]).each(&:delete_all)
# delete file uploads
FileUtils.rm_rf(Rails.root.join('public', 'uploads'))