I need to create a model application form where models can fill it and add pictures to it.
I'm following this example with Uploadify, Paperclip and Rails 3 approach. https://github.com/websymphony/Rails3-Paperclip-Uploadify
To the pictures, i have an polymorphic Attachment model and i would like to attach those ajax uploaded attachments to the yet unsaved model form and there's is where the tricky part cames.
Users are not logged, so there's no "model_id" until is saved.
Since i'm showing the user a small preview of the images that he uploaded in the form by ajax after each upload i need some way to correlate them.
I was thinking about some middle token until the model is saved but i'm not sure whats the best approach to accomplish this.
Thank you!