search for: savedok

Displaying 1 result from an estimated 1 matches for "savedok".

2006 May 17
8
Why can''t I change value of the primary key?
One should be able to change the value of a primary key, right? But it''s not working for me. If I do this: @drug = Drug.find(tid1) @drug.id = tid2 @drug.category = ''Test2'' if @drug.save savedok = ''Saved successfully'' else savedok = ''Not saved'' end I get ''Saved successfully'' but actually the record is not saved or changed at all, nor is there an error added to the object. If I comment out the second line, changing the...