Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-04-08 16:33:36 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-04-15 14:05:14 +0300
commit650f40865e5d8136cb366fbde689c4100aafb0c5 (patch)
treef740d9f235693ad8e2a3693d6ec30dee26d2a74a /rubocop/rubocop.rb
parent7457c1e1229cd1e90e608e8b247e2fbb217f05b6 (diff)
Forbid the use of `#reload` and prefer `#reset`
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 'rubocop/rubocop.rb')
-rw-r--r--rubocop/rubocop.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/rubocop/rubocop.rb b/rubocop/rubocop.rb
index 3e33419eb2e..50eab6f9270 100644
--- a/rubocop/rubocop.rb
+++ b/rubocop/rubocop.rb
@@ -6,6 +6,7 @@ require_relative 'cop/gitlab/finder_with_find_by'
require_relative 'cop/gitlab/union'
require_relative 'cop/include_sidekiq_worker'
require_relative 'cop/safe_params'
+require_relative 'cop/active_record_association_reload'
require_relative 'cop/avoid_return_from_blocks'
require_relative 'cop/avoid_break_from_strong_memoize'
require_relative 'cop/avoid_route_redirect_leading_slash'