The problem seems to come from the table I got from an other dev. Could it be the table unique constraint that cause it add value instead of updading them. I tried to update on other tables and it worked like a charm. I think it would be important to mention that I tried to update other column than slug and I tried outside the foreach width find_one_by_X.