Skip to content

Commit d2a4803

Browse files
committed
Remove unused controller rescue_from handler
Per #954 (comment) Ref 917, 918
1 parent 7e29219 commit d2a4803

File tree

2 files changed

+0
-51
lines changed

2 files changed

+0
-51
lines changed

lib/action_controller/serialization.rb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,6 @@ def use_adapter?
4848
end
4949
end
5050

51-
# Tries to rescue the exception by looking up and calling a registered handler.
52-
#
53-
# Possibly Deprecated
54-
# TODO: Either Decorate 'exception' and define #handle_error where it is serialized
55-
# For example:
56-
# class ExceptionModel
57-
# include ActiveModel::Serialization
58-
# def initialize(exception)
59-
# # etc
60-
# end
61-
# def handle_error(exception)
62-
# exception_model = ActiveModel::Serializer.build_exception_model({ errors: ['Internal Server Error'] })
63-
# render json: exception_model, status: :internal_server_error
64-
# end
65-
# OR remove method as it doesn't do anything right now.
66-
def rescue_with_handler(exception)
67-
super(exception)
68-
end
69-
7051
module ClassMethods
7152
def serialization_scope(scope)
7253
self._serialization_scope = scope

test/action_controller/rescue_from_test.rb

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)