change clone to dup

gist: https://gist.github.com/YongwenZhao/bcb87989ca22661ded87
Rails >= 3.1, clone copies the id, so change to dup