dragonfly
dragonfly copied to clipboard
Mongoid embedded photo model not saving [solution]
Thought this would be helpful to anyone, was facing this issue until I found out what's going on in embedded documents.
When you have Band and Photo model embedded, use cascade_callbacks: true in the embeds_many relation to trigger dragonfly's callback
thanks - does this answer https://github.com/markevans/dragonfly/issues/359?
Seems pretty close.
Without cascade_callbacks, mongoid will not trigger dragonfly's callback so the only field stored is the image_name but not uid.