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 .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.2
NewCops: enable
StyleGuideBaseURL: https://rubystyle.guide
Exclude:
Expand Down
6 changes: 3 additions & 3 deletions app/models/transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ def unassigned_files

# This ensures that the activestorage objects are actually available before we update the initial files counts.
# The files are not available until the after_create_commit callback so our before_save callback does not work
# for initial Transfer creation. This does mean we calculate the counts twice on creation (once with the count as
# always zero, then the initial commit, then during the after_create_commit we re-save which counts them properly).
# for initial Transfer creation. We use `update_columns` here to avoid triggering another before_save callback
# for updating the files_count and unassigned_files_count.
def initial_files_count
save
update_columns(unassigned_files_count: files.count)
end

# This is triggered on before_save, but we must also remember to call Transfer#save to trigger this
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Application < Rails::Application
config.flipflop.raise_strategy_errors = nil

# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.0
config.load_defaults 7.1

# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
Expand Down