Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

My fix for Rails 3.2 tie-in

  • Loading branch information...
commit 87c79550d8207f3187dca3f29fc407cc2697c49c 1 parent 6f4390b
Lars Pind authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/will_paginate/railtie.rb
View
8 lib/will_paginate/railtie.rb
@@ -41,13 +41,11 @@ module ShowExceptionsPatch
extend ActiveSupport::Concern
included { alias_method_chain :status_code, :paginate }
private
- def status_code_with_paginate(exception = self.exception)
- if exception.is_a?(WillPaginate::InvalidPage) or
- (exception.respond_to?(:original_exception) &&
- exception.original_exception.is_a?(WillPaginate::InvalidPage))
+ def status_code_with_paginate
+ if @exception.is_a?(WillPaginate::InvalidPage)
Rack::Utils.status_code(:not_found)
else
- status_code_without_paginate(exception)
+ status_code_without_paginate
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.