search for: human_ref

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

2006 Feb 26
2
How to capture the last DB insertion id ??
...last insertion id of that row/record and then process it further and save reworked version back into the db.table again. Example: a new image gets inserted as a db.table.row with ID = 12345678 (id = primary key) The ID (12345678) is then retrieved and processed and inserted as ''human_ref'' where it''s styled as 1234-5678 in the same db.table.row. Any ideas of how to do this in Rails ? I guess I can use the ''after_save'' callback inside the model - Image - to do the processing, but how could I get hold of the last insertion id easily ? IF AR...