Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 24, 2011
Lars Pind My fix for Rails 3.2 tie-in 87c7955
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

No commit comments for this range

Something went wrong with that request. Please try again.