I am working on rails 4 ruby 2 project. I had paperclip for upload files is working. But when the user doesn't upload any photo, paperclip remove the current uploaded photo and nill the field in the db.
How can I ignore the avatar field in case the user does not upload any photo and keep the previous uploaded one?
My model: has_mongoid_attached_file :avatar,:styles => { :small => "300x300#"}
Thanks a lot...