Skip to content

Commit

Permalink
Remove unused controller rescue_from handler
Browse files Browse the repository at this point in the history
Per
rails-api#954 (comment)

Ref 917, 918
  • Loading branch information
bf4 committed Jun 21, 2015
1 parent 7e29219 commit d2a4803
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
19 changes: 0 additions & 19 deletions lib/action_controller/serialization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,6 @@ def use_adapter?
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
Expand Down
32 changes: 0 additions & 32 deletions test/action_controller/rescue_from_test.rb

This file was deleted.

0 comments on commit d2a4803

Please sign in to comment.