File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11AllCops :
2- TargetRubyVersion : 2.7
2+ TargetRubyVersion : 3.2
33 NewCops : enable
44 StyleGuideBaseURL : https://rubystyle.guide
55 Exclude :
Original file line number Diff line number Diff line change @@ -92,10 +92,10 @@ def unassigned_files
9292
9393 # This ensures that the activestorage objects are actually available before we update the initial files counts.
9494 # The files are not available until the after_create_commit callback so our before_save callback does not work
95- # for initial Transfer creation. This does mean we calculate the counts twice on creation (once with the count as
96- # always zero, then the initial commit, then during the after_create_commit we re-save which counts them properly) .
95+ # for initial Transfer creation. We use `update_columns` here to avoid triggering another before_save callback
96+ # for updating the files_count and unassigned_files_count .
9797 def initial_files_count
98- save
98+ update_columns ( unassigned_files_count : files . count )
9999 end
100100
101101 # This is triggered on before_save, but we must also remember to call Transfer#save to trigger this
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Application < Rails::Application
1717 config . flipflop . raise_strategy_errors = nil
1818
1919 # Initialize configuration defaults for originally generated Rails version.
20- config . load_defaults 7.0
20+ config . load_defaults 7.1
2121
2222 # Please, add to the `ignore` list any other `lib` subdirectories that do
2323 # not contain `.rb` files, or that should not be reloaded or eager loaded.
You can’t perform that action at this time.
0 commit comments