lib/gaffe/errors.rb in gaffe-1.0.2 vs lib/gaffe/errors.rb in gaffe-1.1.0

- old
+ new

@@ -1,12 +1,12 @@ module Gaffe module Errors extend ActiveSupport::Concern included do - before_filter :fetch_exception, only: %w(show) - before_filter :append_view_paths + before_action :fetch_exception, only: %w(show) + before_action :append_view_paths layout 'error' end def show render "errors/#{@rescue_response}", status: @status_code @@ -15,11 +15,11 @@ end protected def fetch_exception - @exception = env['action_dispatch.exception'] - @status_code = ActionDispatch::ExceptionWrapper.new(env, @exception).status_code + @exception = request.env['action_dispatch.exception'] + @status_code = ActionDispatch::ExceptionWrapper.new(request.env, @exception).status_code @rescue_response = ActionDispatch::ExceptionWrapper.rescue_responses[@exception.class.name] end private