thoughtbot/paperclip — Issue #757: id_partition doesn't work with mongodb
Author: ikonyshev
Created: 2012-02-27 02:19:12+00:00
State: open

according to code below (it's from interpolations.rb) id_partition function return nil for mongo ids because mongo use own id class. I think it would be great to convert id to string using .to_s to avoid such problems

```ruby
def id_partition attachment, style_name
case id = attachment.instance.id
when Integer
("%09d" % id).scan(/\d{3}/).join("/")
when String
id.scan(/.{3}/).first(3).join("/")
else
nil
end
end
```