mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fixes variable number naming offenses in spree module
This commit is contained in:
@@ -221,19 +221,16 @@ Metrics/PerceivedComplexity:
|
||||
- 'app/models/spree/ability.rb'
|
||||
- 'app/models/spree/order/checkout.rb'
|
||||
|
||||
# Offense count: 26
|
||||
# Offense count: 24
|
||||
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
||||
# SupportedStyles: snake_case, normalcase, non_integer
|
||||
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
|
||||
Naming/VariableNumber:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/orders_controller.rb'
|
||||
- 'app/models/content_configuration.rb'
|
||||
- 'app/models/preference_sections/main_links_section.rb'
|
||||
- 'lib/spree/core/controller_helpers/common.rb'
|
||||
- 'spec/controllers/spree/admin/search_controller_spec.rb'
|
||||
- 'spec/models/spree/stock_item_spec.rb'
|
||||
- 'spec/models/spree/tax_rate_spec.rb'
|
||||
- 'spec/requests/api/orders_spec.rb'
|
||||
|
||||
# Offense count: 144
|
||||
|
||||
@@ -9,7 +9,7 @@ module Spree
|
||||
|
||||
layout 'darkswarm'
|
||||
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :render_404
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :render404
|
||||
helper 'spree/orders'
|
||||
|
||||
respond_to :html, :json
|
||||
|
||||
@@ -38,7 +38,7 @@ module Spree
|
||||
Spree::Config[:default_seo_title]
|
||||
end
|
||||
|
||||
def render_404(_exception = nil)
|
||||
def render404(_exception = nil)
|
||||
respond_to do |type|
|
||||
type.html {
|
||||
render status: :not_found,
|
||||
|
||||
Reference in New Issue
Block a user