diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e186ef06fa..66f623f711 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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 diff --git a/app/controllers/spree/orders_controller.rb b/app/controllers/spree/orders_controller.rb index f2b47f27ed..aedfdd70f8 100644 --- a/app/controllers/spree/orders_controller.rb +++ b/app/controllers/spree/orders_controller.rb @@ -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 diff --git a/lib/spree/core/controller_helpers/common.rb b/lib/spree/core/controller_helpers/common.rb index 279bb29637..26aef4347a 100644 --- a/lib/spree/core/controller_helpers/common.rb +++ b/lib/spree/core/controller_helpers/common.rb @@ -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,