Hi,

This is a bit of a special case. Ive got a POST form for a posts model
which has a preview functionality. So if the user clicks on "Preview",
then the model is saved and a new window opens with the preview. And
the user can keep adding content to the post and previewing before
he's satisfied and clicks on "Publish". And for every subsequent
previews, i pull that original model from the DB and update it with
the new attributes.

So when the user enters some information but does not upload an
attachment the first time, and then clicks "Preview", the preview
works fine and a record is created in the DB. Now, if he adds an
attachment and hits "Preview", the record is pulled from the DB and
update_attributes is done on it. But paperclip throws an
"ActionController::RoutingError (No route matches ..." error and the
attachment is not uploaded. I think, its looking for the original
attachment that has to be updated.

How can I get around this issue? Any ideas?

Thanks!
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to