carrierwaveuploader/carrierwave — pull request #1482 by jrdi (2014-10-21 17:48:21+00:00)
Title: Custom version filename and callbacks

Hi,

I'm have an `AvatarUploader` and I want to add and static version to keep the same url when the user change his avatar.

I found the following issue, when I change the avatar:
```ruby
u.update_attributes avatar: File.open("/Users/jrdi/Downloads/avatar-1.jpg")
```
It doesn't generates the static version. I make some experiments and I found that if I skip the remove callback:
```ruby
skip_callback :save, :after, :remove_previously_stored_avatar
```
Everything works fine (but it doesn't remove previous avatar of course), so I suspect that something is wrong with this callback.

Here you can found AvatarUploader.
```ruby
class AvatarUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick

storage :file

def store_dir
"system/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end

process :resize_to_fill => [150, 150]

def extension_white_list
%w(jpg jpeg png)
end

version :big do
process :resize_to_fill => [84, 84]
end

version :medium do
process :resize_to_fill => [56, 56]
end

version :small do
process :resize_to_fill => [42, 42]
end

version :static do
def full_filename(for_file = model.avatar.file)
"static.jpg"
end
end
end
```

Any idea about what is going wrong? Thanks!