Skip to content
Open
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
1 change: 0 additions & 1 deletion app/models/contest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class Contest < ApplicationRecord
end

update_contest_scores if finalized_at_was && finalized_at.nil?
true
end

# calculate contest scores again from scratch
Expand Down
1 change: 0 additions & 1 deletion app/models/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class Item < ApplicationRecord

before_create do
self.scan_token = SecureRandom.random_number(100000000)
true
end

def scan_token
Expand Down
1 change: 0 additions & 1 deletion app/models/submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def user_problem_relation
end
self.evaluation = points.nil? || maximum_points.nil? ? nil : (points / maximum_points).to_f
update_test_messages
true
end

before_create do
Expand Down
1 change: 0 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class User < ApplicationRecord

before_save do
self.can_change_username = false if username_changed? # can only change username once
true # this line should be removed once we upgrade to Rails >= 5.1, see https://guides.rubyonrails.org/5_1_release_notes.html#active-model-removals
end

has_many :problems
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/new_framework_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
Rails.application.config.active_record.belongs_to_required_by_default = false

# Do not halt callback chains when a callback returns false. Previous versions had true.
ActiveSupport.halt_callback_chains_on_return_false = true
ActiveSupport.halt_callback_chains_on_return_false = false