Fix all Style/RedundantSelf rubocop issues

This commit is contained in:
Bertocq
2017-07-04 22:53:25 +02:00
parent 97d7a21791
commit 2888c20489
40 changed files with 102 additions and 107 deletions

View File

@@ -4,33 +4,33 @@ module Graphqlable
class_methods do
def graphql_field_name
self.name.gsub('::', '_').underscore.to_sym
name.gsub('::', '_').underscore.to_sym
end
def graphql_field_description
"Find one #{self.model_name.human} by ID"
"Find one #{model_name.human} by ID"
end
def graphql_pluralized_field_name
self.name.gsub('::', '_').underscore.pluralize.to_sym
name.gsub('::', '_').underscore.pluralize.to_sym
end
def graphql_pluralized_field_description
"Find all #{self.model_name.human.pluralize}"
"Find all #{model_name.human.pluralize}"
end
def graphql_type_name
self.name.gsub('::', '_')
name.gsub('::', '_')
end
def graphql_type_description
(self.model_name.human).to_s
(model_name.human).to_s
end
end
def public_created_at
self.created_at.change(min: 0)
created_at.change(min: 0)
end
end