Skip to content

Instantly share code, notes, and snippets.

Avatar

Ray Parker RayParkerBassPlayer

View GitHub Profile
@RayParkerBassPlayer
RayParkerBassPlayer / application_controller.rb
Last active Dec 20, 2019
Default Exception Handling, Rails
View application_controller.rb
rescue_from Exception, :with => :handle_exceptions
def handle_exceptions(exception)
cookies[:exception] = exception.message
Rails.logger.error exception.backtrace.join("\n")
redirect_to error_page_path
end