I have a transaction in one of my model. When something go wrong, I want to be notified.
If it would be transaction in controller, I would simply do:
begin
(my transaction...)
rescue => exception
ExceptionNotifier.deliver_exception_notification(exception, self, request, data)
end
But I want to do similar thing in my model, passing nils
as self
and request
does not help. What can I do about it?