Merge pull request #918 from aceofsales/rescue_from

Adding rescue_with_handler to clear state
This commit is contained in:
João Moura
2015-05-20 23:39:45 -03:00
3 changed files with 46 additions and 0 deletions

View File

@@ -53,6 +53,14 @@ module ActionController
end
end
def rescue_with_handler(exception)
@_serializer = nil
@_serializer_opts = nil
@_adapter_opts = nil
super(exception)
end
module ClassMethods
def serialization_scope(scope)
self._serialization_scope = scope