Created
January 27, 2010 15:09
-
-
Save phuesler/287910 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# actionpack-2.3.4/test/controller/rescue_test.rb | |
# Removed code for simplicity | |
class RescueController < ActionController::Base | |
# Omitted the exception declarations such as NotAuthorized | |
def method_not_allowed | |
raise ActionController::MethodNotAllowed.new(:get, :head, :put) | |
end | |
def not_implemented | |
raise ActionController::NotImplemented.new(:get, :put) | |
end | |
def not_authorized | |
raise NotAuthorized | |
end | |
def bad_gateway | |
raise BadGateway | |
end | |
def resource_unavailable | |
raise ResourceUnavailable | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment