thoughtbot/paperclip — Issue #719: Uploaded files with the same filename causes error in production
Author: mobits
Created: 2012-01-26 22:31:33+00:00
State: open

Hi,

suppose I upload an attachment with name "foo.txt" and later upload a **different file** but with the same name. In production, (i.e. with config.cache_classes = true), if I request the attachment, it will provide me the **old** file content!

Here is the scenario:

my model class

```ruby
class Bar < ActiveRecord::Base

has_attached_file :my_attachment

end
```

in development.rb (in order to reproduce the error)

```ruby
...
config.cache_classes = true
...
```

I know I could "solve" this problem forcing :path value to include something like :fingerprint, but I believe the problem above is a bug.