Looks like it's a known issue but i'm not able to find any solution nor any dirty fix to make it working. The thing is i'm not able to remove attachments uploaded using Carrierwave plugin.
I'm using a special form field called :remove_avatar
which should remove a avatar file and clear avatar column but the only thing it does is deleting the file, the file reference in avatar column still exists.
I was trying to remove it in any possible way but without a luck.
update_attributes
using u.update_attributes( :avatar => "" )
is not removing the reference
save()
u = User.find(int)
u.avatar = ""
u.save
is also not removing the reference
remove_avatar = true
u.remove_avatar = true
u.save
not working
remove_avatar!
u.remove_avatar!
u.save
not working
f.check_box :remove_avatar
not working
By 'not working' i mean that the file is removed from filesystem but the reference persists.
Cany you please provide me ANY tip i can use to make it working again? It can be something dirty, this bug shown a day before my deadline and i feel quite desperate. Thanks in advance.
Ruby: 1.8.7
Rails: 3.2.6
Carrierwave: master branch from git repo