Paperclip - when validation fails, hold onto attachments

I’ve seen this with paperclip before I think, anyone know how to fix it?

When my validation fails the form is re-rendered with the validation
error messages, all fine. However, the paperclip attachments that were
previously attached get lost.

Thinking that others may have done something with this and grateful if
anyone could share a solution.

Not really acceptable for users to see this behavior.




  logger.debug "=======\r"
  logger.debug @explonaut.portrait.valid?
  logger.debug if

logger.debug “=======\r”

=> if @explonaut.portrait.valid?

YEAH … same problem to me!

Do you find a solution?

I do find this >
< … but I’m not really happy with that.

Best Regards

I still have the problem - be nice to solve for my users.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs