class RescueController

Public Instance Methods

bad_gateway() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 119
def bad_gateway
  raise BadGateway
end
bad_gateway_raise_as_string() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 122
def bad_gateway_raise_as_string
  raise BadGatewayToRescueAsString
end
before_action_raises() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 75
def before_action_raises
end
exception_with_more_specific_handler_for_cause() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 142
def exception_with_more_specific_handler_for_cause
  raise NotAuthorized
rescue
  raise RecordInvalid
end
exception_with_more_specific_handler_for_wrapper() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 136
def exception_with_more_specific_handler_for_wrapper
  raise RecordInvalid
rescue
  raise NotAuthorized
end
exception_with_no_handler_for_wrapper() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 148
def exception_with_no_handler_for_wrapper
  raise RecordInvalid
rescue
  raise RangeError
end
invalid_request() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 105
def invalid_request
  raise InvalidRequest
end
invalid_request_raise_as_string() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 108
def invalid_request_raise_as_string
  raise InvalidRequestToRescueAsString
end
method_not_allowed() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 83
def method_not_allowed
  raise ActionController::MethodNotAllowed.new(:get, :head, :put)
end
missing_template() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 133
def missing_template
end
not_allowed() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 98
def not_allowed
  raise NotAllowed
end
not_allowed_raise_as_string() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 101
def not_allowed_raise_as_string
  raise NotAllowedToRescueAsString
end
not_authorized() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 91
def not_authorized
  raise NotAuthorized
end
not_authorized_raise_as_string() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 94
def not_authorized_raise_as_string
  raise NotAuthorizedToRescueAsString
end
not_implemented() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 87
def not_implemented
  raise ActionController::NotImplemented.new(:get, :put)
end
raises() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 78
def raises
  render plain: "already rendered"
  raise "don't panic!"
end
record_invalid() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 112
def record_invalid
  raise RecordInvalid
end
record_invalid_raise_as_string() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 115
def record_invalid_raise_as_string
  raise RecordInvalidToRescueAsString
end
resource_unavailable() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 126
def resource_unavailable
  raise ResourceUnavailable
end
resource_unavailable_raise_as_string() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 129
def resource_unavailable_raise_as_string
  raise ResourceUnavailableToRescueAsString
end

Private Instance Methods

deny_access() click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 155
def deny_access
  head :forbidden
end
show_errors(exception) click to toggle source
# File actionpack/test/controller/rescue_test.rb, line 159
def show_errors(exception)
  head :unprocessable_entity
end