mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove unused controller rescue_with_handler
Per https://github.com/rails-api/active_model_serializers/pull/954#discussion_r32589882 Ref 917, 918
This commit is contained in:
@@ -52,25 +52,6 @@ module ActionController
|
||||
end
|
||||
end
|
||||
|
||||
# Tries to rescue the exception by looking up and calling a registered handler.
|
||||
#
|
||||
# Possibly Deprecated
|
||||
# TODO: Either Decorate 'exception' and define #handle_error where it is serialized
|
||||
# For example:
|
||||
# class ExceptionModel
|
||||
# include ActiveModel::Serialization
|
||||
# def initialize(exception)
|
||||
# # etc
|
||||
# end
|
||||
# def handle_error(exception)
|
||||
# exception_model = ActiveModel::Serializer.build_exception_model({ errors: ['Internal Server Error'] })
|
||||
# render json: exception_model, status: :internal_server_error
|
||||
# end
|
||||
# OR remove method as it doesn't do anything right now.
|
||||
def rescue_with_handler(exception)
|
||||
super(exception)
|
||||
end
|
||||
|
||||
module ClassMethods
|
||||
def serialization_scope(scope)
|
||||
self._serialization_scope = scope
|
||||
|
||||
Reference in New Issue
Block a user