Skip to content

Commit

Permalink
Merge pull request #601 from elengine/fix_exception_cause_none
Browse files Browse the repository at this point in the history
fix: actual_exception is NilClass when 'exception.cause' is nil.
  • Loading branch information
mislav authored Oct 8, 2019
2 parents 876aa83 + 6fdbde4 commit 5adf241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/will_paginate/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module ShowExceptionsPatch
end
def status_code_with_paginate(exception = @exception)
actual_exception = if exception.respond_to?(:cause)
exception.cause
exception.cause || exception
elsif exception.respond_to?(:original_exception)
exception.original_exception
else
Expand Down

0 comments on commit 5adf241

Please sign in to comment.