Skip to content

Commit

Permalink
Rubocop cleanup: Naming/MethodParameterName
Browse files Browse the repository at this point in the history
  • Loading branch information
JPrevost committed Aug 12, 2024
1 parent 0e91ff5 commit f2b0e7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ Minitest/AssertRaisesCompoundBody:
Minitest/MultipleAssertions:
Max: 5

# Offense count: 1
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'app/controllers/graphql_controller.rb'

# Offense count: 6
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/graphql_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def prepare_variables(variables_param)
end
end

def handle_error_in_development(e)
logger.error e.message
logger.error e.backtrace.join("\n")
def handle_error_in_development(error)
logger.error error.message
logger.error error.backtrace.join("\n")

render json: { errors: [{ message: e.message, backtrace: e.backtrace }], data: {} }, status: :internal_server_error
render json: { errors: [{ message: error.message, backtrace: error.backtrace }], data: {} }, status: :internal_server_error
end
end

0 comments on commit f2b0e7d

Please sign in to comment.