change clone to dup

gist: https://gist.github.com/YongwenZhao/bcb87989ca22661ded87
Rails >= 3.1, clone copies the id, so change to dup
Do we need to change the later clause also?
```j.attachment = i.attachment.clone;```