Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[#72] Rails3 fix for ActionController::Base::rescue_responses removal

  • Loading branch information...
commit bdf679bde6a6b777358ab53cfba4c7533282125d 1 parent 61b4f2f
Dan Croak croaky authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 lib/clearance/extensions/rescue.rb
4 lib/clearance/extensions/rescue.rb
... ... @@ -1,3 +1,5 @@
1   -if defined?(ActionController::Base)
  1 +if defined?(ActionDispatch::ShowExceptions) # Rails 3
  2 + ActionDispatch::ShowExceptions.rescue_responses.update('ActionController::Forbidden' => :forbidden)
  3 +elsif defined?(ActionController::Base)
2 4 ActionController::Base.rescue_responses.update('ActionController::Forbidden' => :forbidden)
3 5 end

0 comments on commit bdf679b

Please sign in to comment.
Something went wrong with that request. Please try again.