The problem I'm having is not quite rare, though I can't find any online guidance for this topic :S
I'm having two models: User and Picture A User can have up to 10 pictures and a picture belongs to one user.
Now I want an input form for creating a user. Though one requirement is that the user shall have selected a minimum of X pictures. I want to upload the pictures via AJAX while the user is filling out the form. This is why I need the id of the user before he actually clicked "Submit" on the form. The picture model needs it to bind the single picture to the user in the database.
I thought about creating an empty User if a single file is accessing the users#create method, but validating wouldn't take place and if the new user just leaves the site without registering, the pictures would last with an empty account.
Thanks in advance!