I''d almost think the presence of "validates_associated" is causing the associated model to run validation twice. The associated model, Upload, which handles uploaded files and saves them, is saving each uploaded file twice in a row. This doesn''t happen if I remove "validates_associated" from the model it belongs to, or if I have the model save files during after_create instead of after_validation_on_create. I have changed it so it works for the time being, but at the moment I''m baffled. Even in the Image model which is a subclass of Upload, thumbnails made with RMagick are saved twice instead of once. I have no idea why. I''ve pastied everything. There''s really nothing complicated going on there: http://pastie.caboo.se/42937 So I''m imagining, although I could be wrong, that validates_associated is somehow causing validation on the associated Upload to be run twice, and since it''s run twice then similarly so is after_validation_on_create, which is thus causing files to be written twice. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---