Skip to content
Snippets Groups Projects
Commit c6bddeac authored by Jacopo's avatar Jacopo
Browse files

Updates code using class_methods over module ClassMethods

parent 8af40870
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -84,7 +84,7 @@ module API
end
end
 
module ClassMethods
class_methods do
private
 
def install_error_responders(base)
Loading
Loading
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ module Gitlab
module ExposeAttribute
extend ActiveSupport::Concern
 
module ClassMethods
class_methods do
# Defines getter methods for the given attribute names.
#
# Example:
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ module Gitlab
module MountMutation
extend ActiveSupport::Concern
 
module ClassMethods
class_methods do
def mount_mutation(mutation_class)
# Using an underscored field name symbol will make `graphql-ruby`
# standardize the field name
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
module StaticModel
extend ActiveSupport::Concern
 
module ClassMethods
class_methods do
# Used by ActiveRecord's polymorphic association to set object_id
def primary_key
'id'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment