Skip to content

Commit

Permalink
fix(rubocop): use normalcase for method name numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-lagreca committed Jan 18, 2024
1 parent b70eed7 commit 68947ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ class ApplicationController < ActionController::Base
include AppsValidator

unless Rails.application.config.consider_all_requests_local
rescue_from StandardError, with: :on_500
rescue_from ActionController::RoutingError, with: :on_404
rescue_from ActiveRecord::RecordNotFound, with: :on_404
rescue_from ActionController::UnknownFormat, with: :on_406
rescue_from ApplicationController::InvalidAuthenticityToken, with: :on_406
rescue_from StandardError, with: :on500
rescue_from ActionController::RoutingError, with: :on404
rescue_from ActiveRecord::RecordNotFound, with: :on404
rescue_from ActionController::UnknownFormat, with: :on406
rescue_from ApplicationController::InvalidAuthenticityToken, with: :on406
end

protect_from_forgery with: :exception

@build_number = Rails.configuration.build_number

def on_404
def on404
render_error(404)
end

# 406 Not Acceptable
def on_406
def on406
render_error(406)
end

def on_500
def on500
render_error(500)
end

Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@
end

# To treat errors on pages that don't fall on any other controller
match '*path' => 'application#on_404', via: :all
match '*path' => 'application#on404', via: :all
end

0 comments on commit 68947ae

Please sign in to comment.