Permalink
Browse files

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

  • Loading branch information...
1 parent 61b4f2f commit bdf679bde6a6b777358ab53cfba4c7533282125d @croaky croaky committed Feb 21, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/clearance/extensions/rescue.rb
@@ -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.