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

@@ -213,3 +213,9 @@ end
Spam::UnrelatedLinkSerializer = Class.new(ActiveModel::Serializer) do
attributes :id
end
RaiseErrorSerializer = Class.new(ActiveModel::Serializer) do
def json_key
raise StandardError, 'Intentional error for rescue_from test'
end
end