/Jonas
> --
> You received this message because you are subscribed to the Google Groups "carrierwave" group.
> To post to this group, send email to carri...@googlegroups.com.
> To unsubscribe from this group, send email to carrierwave...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/carrierwave?hl=en.
>
>
/Jonas
Samuel, althought that might seem like a clean workaround. It isn't
really. i.e. if the user decides to upload a file with a different
extension.
Jonas Nicklas, have you taken Victor Stan's suggestion into
consideration? IMO, this is quite a crucial feature to have in
Carrierwave. Leaving uploaded files unattended only consumes server
space
--
You received this message because you are subscribed to the Google Groups "carrierwave" group.
To post to this group, send email to carri...@googlegroups.com.
To unsubscribe from this group, send email to carrierwave...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/carrierwave?hl=en.
Yea but sticking with another model is an resourceful. Having a second
model just to succumb to this bug is unjustifiable :-P The bug should
be fixed. Have been looking around google. Seems like this bug has
been around for a while. Does the developer of the gem not want to fix
this?
To unsubscribe from this group, send email to carrierwave...@googlegroups.com.
I can see why you might find it frustrating, but I'm sure if you sat down and tried to think of how to solve this problem you'd run into the same road-blocks as everyone else. Its just simply not an easy problem to solve, otherwise it would have been fixed already, I'm sure you can appreciate that.Personally, I think adding another model is quite an elegant solution. Mix it in with accepts_nested_attributes_for and its not too complicated to implement either.
/Jonas
before :save, :delete_old_file
def delete_old_file
FileUtils.rm_rf(model.profile_picture.url)
end