Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ gem 'propshaft'
gem 'puma', '~> 8.0'
gem 'rack_content_type_default', '~> 1.1'
gem 'rack-cors'
gem 'rails', '~> 7.2'
gem 'rails', '~> 8.0.5'
gem 'ruby-progressbar', '~> 1.13', require: false
gem 'sentry-rails'
gem 'statesman'
Expand Down
131 changes: 65 additions & 66 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,68 +11,65 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.3.1)
actionpack (= 7.2.3.1)
activesupport (= 7.2.3.1)
actioncable (8.0.5)
actionpack (= 8.0.5)
activesupport (= 8.0.5)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.3.1)
actionpack (= 7.2.3.1)
activejob (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
actionmailbox (8.0.5)
actionpack (= 8.0.5)
activejob (= 8.0.5)
activerecord (= 8.0.5)
activestorage (= 8.0.5)
activesupport (= 8.0.5)
mail (>= 2.8.0)
actionmailer (7.2.3.1)
actionpack (= 7.2.3.1)
actionview (= 7.2.3.1)
activejob (= 7.2.3.1)
activesupport (= 7.2.3.1)
actionmailer (8.0.5)
actionpack (= 8.0.5)
actionview (= 8.0.5)
activejob (= 8.0.5)
activesupport (= 8.0.5)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.3.1)
actionview (= 7.2.3.1)
activesupport (= 7.2.3.1)
cgi
actionpack (8.0.5)
actionview (= 8.0.5)
activesupport (= 8.0.5)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.3)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.3.1)
actionpack (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
actiontext (8.0.5)
actionpack (= 8.0.5)
activerecord (= 8.0.5)
activestorage (= 8.0.5)
activesupport (= 8.0.5)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.3.1)
activesupport (= 7.2.3.1)
actionview (8.0.5)
activesupport (= 8.0.5)
builder (~> 3.1)
cgi
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.3.1)
activesupport (= 7.2.3.1)
activejob (8.0.5)
activesupport (= 8.0.5)
globalid (>= 0.3.6)
activemodel (7.2.3.1)
activesupport (= 7.2.3.1)
activerecord (7.2.3.1)
activemodel (= 7.2.3.1)
activesupport (= 7.2.3.1)
activemodel (8.0.5)
activesupport (= 8.0.5)
activerecord (8.0.5)
activemodel (= 8.0.5)
activesupport (= 8.0.5)
timeout (>= 0.4.0)
activestorage (7.2.3.1)
actionpack (= 7.2.3.1)
activejob (= 7.2.3.1)
activerecord (= 7.2.3.1)
activesupport (= 7.2.3.1)
activestorage (8.0.5)
actionpack (= 8.0.5)
activejob (= 8.0.5)
activerecord (= 8.0.5)
activesupport (= 8.0.5)
marcel (~> 1.0)
activesupport (7.2.3.1)
activesupport (8.0.5)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -81,9 +78,10 @@ GEM
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1, < 6)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
administrate (1.0.0)
Expand Down Expand Up @@ -136,7 +134,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cgi (0.5.1)
childprocess (4.1.0)
choice (0.2.0)
climate_control (1.2.0)
Expand Down Expand Up @@ -247,7 +244,7 @@ GEM
actionview (>= 7.0.0)
activesupport (>= 7.0.0)
jmespath (1.6.2)
json (2.19.3)
json (2.19.5)
jwt (2.10.2)
base64
kaminari (1.2.2)
Expand All @@ -268,24 +265,27 @@ GEM
loofah (2.25.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
mail (2.9.0)
logger
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
marcel (1.1.0)
matrix (0.4.3)
method_source (1.1.0)
mini_magick (5.3.1)
logger
mini_mime (1.1.5)
minitest (5.27.0)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
msgpack (1.8.0)
multi_xml (0.8.1)
bigdecimal (>= 3.1, < 5)
net-http (0.9.1)
uri (>= 0.11.1)
net-imap (0.5.9)
net-imap (0.6.4)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -379,20 +379,20 @@ GEM
rack
rackup (2.3.1)
rack (>= 3)
rails (7.2.3.1)
actioncable (= 7.2.3.1)
actionmailbox (= 7.2.3.1)
actionmailer (= 7.2.3.1)
actionpack (= 7.2.3.1)
actiontext (= 7.2.3.1)
actionview (= 7.2.3.1)
activejob (= 7.2.3.1)
activemodel (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
rails (8.0.5)
actioncable (= 8.0.5)
actionmailbox (= 8.0.5)
actionmailer (= 8.0.5)
actionpack (= 8.0.5)
actiontext (= 8.0.5)
actionview (= 8.0.5)
activejob (= 8.0.5)
activemodel (= 8.0.5)
activerecord (= 8.0.5)
activestorage (= 8.0.5)
activesupport (= 8.0.5)
bundler (>= 1.15.0)
railties (= 7.2.3.1)
railties (= 8.0.5)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -405,10 +405,9 @@ GEM
rails-html-sanitizer (1.7.0)
loofah (~> 2.25)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.2.3.1)
actionpack (= 7.2.3.1)
activesupport (= 7.2.3.1)
cgi
railties (8.0.5)
actionpack (= 8.0.5)
activesupport (= 8.0.5)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -617,7 +616,7 @@ DEPENDENCIES
puma (~> 8.0)
rack-cors
rack_content_type_default (~> 1.1)
rails (~> 7.2)
rails (~> 8.0.5)
rails-erd
rspec
rspec-rails
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/class_members_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def members_existing_in_profile
end

def class_member_params
params.require(:class_member).permit(:user_id, :type)
params.expect(class_member: %i[user_id type])
end

def create_batch_params
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/api/google_auth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def response_error_message
end

def google_token_params
params.require(:google_auth).require(:code)
params.require(:google_auth).require(:redirect_uri)
params.require(:google_auth).permit(:code, :redirect_uri)
google_auth_params = params.expect(google_auth: %i[code redirect_uri])
google_auth_params.require(%i[code redirect_uri])
google_auth_params
end
end
end
24 changes: 13 additions & 11 deletions app/controllers/api/projects/remixes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ def load_and_authorize_remix_identifier
end

def remix_params
params.require(:project)
.permit(:name,
:identifier,
:project_type,
:locale,
:user_id,
:videos,
:audio,
:instructions,
image_list: [],
components: %i[id name extension content index])
params
.expect(project: [:name,
:identifier,
:project_type,
:locale,
:user_id,
:videos,
:audio,
:instructions,
{
image_list: [],
components: [%i[id name extension content index]]
Comment thread
abcampo-iry marked this conversation as resolved.
}])
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/api/school_classes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ def load_and_authorize_school_class

def school_class_params
# A school teacher may only create classes they own.
params.require(:school_class).permit(:name, :description)
params.expect(school_class: %i[name description])
end

def import_school_class_params
params.require(:school_class).permit(:name, :description, :import_origin, :import_id)
params.expect(school_class: %i[name description import_origin import_id])
end

def import_school_students_params
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/school_students_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def remove_students(student_ids)
end

def school_student_params
params.require(:school_student).permit(:username, :password, :name)
params.expect(school_student: %i[username password name])
end

def school_students_params
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/school_teachers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def create
private

def school_teacher_params
params.require(:school_teacher).permit(:email_address)
params.expect(school_teacher: [:email_address])
end
end
end
40 changes: 20 additions & 20 deletions app/controllers/api/schools_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,26 @@ def import
private

def school_params
params.require(:school).permit(
:name,
:website,
:reference,
:district_name,
:district_nces_id,
:school_roll_number,
:address_line_1,
:address_line_2,
:municipality,
:administrative_area,
:postal_code,
:country_code,
:creator_role,
:creator_department,
:creator_agree_authority,
:creator_agree_terms_and_conditions,
:creator_agree_to_ux_contact,
:creator_agree_responsible_safeguarding,
:user_origin
params.expect(
school: %i[name
website
reference
district_name
district_nces_id
school_roll_number
address_line_1
address_line_2
municipality
administrative_area
postal_code
country_code
creator_role
creator_department
creator_agree_authority
creator_agree_terms_and_conditions
creator_agree_to_ux_contact
creator_agree_responsible_safeguarding
user_origin]
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def check_cloudflare_turnstile
end

def subscription_params
params.require(:subscription).permit(:email, :test_opt_in, :privacy_policy, :turnstile_token)
params.expect(subscription: %i[email test_opt_in privacy_policy turnstile_token])
end

def subscriptions_submitter
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

module App
class Application < Rails::Application
config.load_defaults 7.2
config.load_defaults 8.0

config.add_autoload_paths_to_load_path = false

Expand Down
Loading
Loading