Skip to content

Commit

Permalink
[thoughtbot#72] Rails3 fix for ActionController::Base::rescue_respons…
Browse files Browse the repository at this point in the history
…es removal
  • Loading branch information
Dan Croak committed Feb 21, 2010
1 parent 61b4f2f commit bdf679b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/clearance/extensions/rescue.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
if defined?(ActionController::Base)
if defined?(ActionDispatch::ShowExceptions) # Rails 3
ActionDispatch::ShowExceptions.rescue_responses.update('ActionController::Forbidden' => :forbidden)
elsif defined?(ActionController::Base)
ActionController::Base.rescue_responses.update('ActionController::Forbidden' => :forbidden)
end

0 comments on commit bdf679b

Please sign in to comment.