My model has 2 attachments
dragonfly_accessor :original do
copy_to :image
end
dragonfly_accessor :image do
after_assign :process_image
end
I am also using retained_original in my form.
The problem seems to be that:
- If I upload a graphic, and submit the form
- And the form Fails validation (thus filling the retained_original)
- And then I fix the form issue
- When I submit the form, the
original_uid is set but the image_uid is NOT set.
Based on reading the source code it looks like the "retained_#{attribute}=" method does not go through the dragonfly_attachments[attribute].assign(value) path, which prevents the after_assign callback from being fired.
My only idea right now is to remove the retained_original usage, since this is causing my models to end up in an unexpected situation.
Please let me know if I'm using these 2 features together incorrectly.
My model has 2 attachments
I am also using
retained_originalin my form.The problem seems to be that:
original_uidis set but theimage_uidis NOT set.Based on reading the source code it looks like the
"retained_#{attribute}="method does not go through thedragonfly_attachments[attribute].assign(value)path, which prevents the after_assign callback from being fired.My only idea right now is to remove the
retained_originalusage, since this is causing my models to end up in an unexpected situation.Please let me know if I'm using these 2 features together incorrectly.