Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mongoid embedded photo model not saving [solution] #475

Open
elithecho opened this issue Jun 19, 2017 · 2 comments
Open

Mongoid embedded photo model not saving [solution] #475

elithecho opened this issue Jun 19, 2017 · 2 comments

Comments

@elithecho
Copy link

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

@markevans
Copy link
Owner

markevans commented Jun 20, 2017

thanks - does this answer #359?

@elithecho
Copy link
Author

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants