globalize2
globalize2 copied to clipboard
model.clone() not working as exprected on translated columns
On Rails 2.3.4, given I have a record_title-model:
% script/console test
r = RecordTitle.first
RecordTitle id: 10000, infotype: "SI", docno: "0258", unitno: "38", text: "Vel voluptate aliquid et doloribus sint eum ad sequ...", fun_group_id: 10000, fun_subgroup_id: 10000, created_at: "2001-11-14 23:00:00", updated_at: "2008-05-23 22:00:00", state: "draft"
rc = r.clone
RecordTitle id: nil, infotype: "SI", docno: "0258", unitno: "38", text: "Vel voluptate aliquid et doloribus sint eum ad sequ...", fun_group_id: 10000, fun_subgroup_id: 10000, created_at: "2001-11-14 23:00:00", updated_at: "2008-05-23 22:00:00", state: "draft"
rc.text
nil
r.text
"Vel voluptate aliquid et doloribus sint eum ad sequi."
Even after saving the newly cloned model, the text remains empty. Thus it is not cloned as all the other atributes.