diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-08 15:33:36 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-15 13:05:14 +0200 |
commit | 650f40865e5d8136cb366fbde689c4100aafb0c5 (patch) | |
tree | f740d9f235693ad8e2a3693d6ec30dee26d2a74a /app/services/notes | |
parent | 7457c1e1229cd1e90e608e8b247e2fbb217f05b6 (diff) | |
download | gitlab-ce-forbid-the-usage-of-reload.tar.gz |
Forbid the use of `#reload` and prefer `#reset`forbid-the-usage-of-reload
The `#reload` makes to load all objects into memory,
and the main purpose of `#reload` is to drop the association cache.
The `#reset` seems to solve exactly that case.
Diffstat (limited to 'app/services/notes')
-rw-r--r-- | app/services/notes/update_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb index d2052bed646..384d1dd2e50 100644 --- a/app/services/notes/update_service.rb +++ b/app/services/notes/update_service.rb @@ -22,7 +22,7 @@ module Notes # We need to refresh the previous suggestions call cache # in order to get the new records. - note.reload + note.reset end note |