diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-08-30 08:56:07 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-08-30 08:56:07 +0000 |
commit | f474f16faed3cbf1c5c113bfe4227109b76ffb3e (patch) | |
tree | 0641af666fe5bc17a9ed55a9ddabc46a9647dd61 /lib/api | |
parent | f4d04ee9aaaead634543ee024d275f20edbe563e (diff) | |
parent | 4a37cd0dc08ccef417a423b3a9a91b33c26c4199 (diff) | |
download | gitlab-ce-f474f16faed3cbf1c5c113bfe4227109b76ffb3e.tar.gz |
Merge branch '50414-rubocop-rule-to-enforce-class-methods-over-module' into 'master'
Resolve "Make a Rubocop cop to prefer class_methods over ClassMethods for ActiveSupport::Concern"
Closes #50414
See merge request gitlab-org/gitlab-ce!21379
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/api_guard.rb | 2 | ||||
-rw-r--r-- | lib/api/projects_relation_builder.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb index c17089759de..8ee7987cfff 100644 --- a/lib/api/api_guard.rb +++ b/lib/api/api_guard.rb @@ -84,7 +84,7 @@ module API end end - module ClassMethods + class_methods do private def install_error_responders(base) diff --git a/lib/api/projects_relation_builder.rb b/lib/api/projects_relation_builder.rb index 6482fd94ab8..9fd79c491c2 100644 --- a/lib/api/projects_relation_builder.rb +++ b/lib/api/projects_relation_builder.rb @@ -2,7 +2,7 @@ module API module ProjectsRelationBuilder extend ActiveSupport::Concern - module ClassMethods + class_methods do def prepare_relation(projects_relation, options = {}) projects_relation = preload_relation(projects_relation, options) execute_batch_counting(projects_relation) |