help needed to create a complex form

Hi   My models are message_thread, message, document (document with attachments I am using paperclip)

message_thread

Hi,

There is an example for nested file upload form by using paperclip. The codes are similar to you, be attention to the usage of accepts_nested_attributes_for.

Check it here: http://rails-bestpractices.com/posts/45-use-sti-and-polymorphic-model-for-multiple-uploads

Hi    Thanks for replying.I could do it partially with the following modifications to my models and views

message_thread

Hi,

Be sure you have build the document for message before you use it.