How to handle other resource notifications when inside a change?
Here is my change implementation:
This will run as a change of another resource, as you can see, it basically fetches the resource and updates its status. The problem is that the
Property
resource also has a pubsub notification for when the update
action is called, and I will miss that notification and receive a warning since I'm not handling it here.
My question is, how can I handle the update
action notification inside that change?2 Replies
You'd add the
return_notifications?: true
option to Property.update!
and then you'd return {changeset, %{notifications: notifications}}
from your before_action
callbackThanks Zack, that did it!