lib/will_paginate/railtie.rb in will_paginate-3.1.8 vs lib/will_paginate/railtie.rb in will_paginate-3.2.0

- old
+ new

@@ -1,6 +1,5 @@ -require 'will_paginate' require 'will_paginate/page_number' require 'will_paginate/collection' require 'will_paginate/i18n' module WillPaginate @@ -37,10 +36,10 @@ alias_method :status_code_without_paginate, :status_code alias_method :status_code, :status_code_with_paginate 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 exception end