Replies: 1 comment 3 replies
-
We use |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
still in the process of refactoring our code for v2 I found another hiccup I can't resolve. we have this as extension:
with NotificationRelation being:
I tried overwriting
recipient_attributes_for
fromNoticed::Deliverable
but I get
ActiveModel::UnknownAttributeError: unknown attribute 'notification_relations_attributes' for Noticed::Notification
which seems to be related tonotifications.insert_all!(recipients_attributes, record_timestamps: true) if recipients_attributes.any?
fromNoticed::Deliverable
.The only way I got this to work was overwriting the complete
def deliver(recipients = nil, enqueue_job: true, **options)
method and using this blockThis seems not to be a correct approach, so I'd love to hear how I'd go about this. (I briefly started fiddling around with the undocumented
def autosave_associated_records_for_*
method, but that wasn't even picked up in my tests.)Beta Was this translation helpful? Give feedback.
All reactions