diff --git a/app/models/contest.rb b/app/models/contest.rb index 024ca908..ebe8447e 100644 --- a/app/models/contest.rb +++ b/app/models/contest.rb @@ -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 diff --git a/app/models/item.rb b/app/models/item.rb index dc68a9d5..93594c1e 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -12,7 +12,6 @@ class Item < ApplicationRecord before_create do self.scan_token = SecureRandom.random_number(100000000) - true end def scan_token diff --git a/app/models/submission.rb b/app/models/submission.rb index cb6690ca..1c229178 100644 --- a/app/models/submission.rb +++ b/app/models/submission.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 759b8f0c..b6c46b85 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index cbf423a8..66bc22ce 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -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