Skip to content
New issue

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

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

Already on GitHub? Sign in 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.

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

No branches or pull requests

2 participants