In two tables mapped to ActiveRecord with unknown number of identical columns, e.g.:
Table A Table B
--------- ---------
id id
name name
age email
email is_member
How can I (elegantly) copy all identical attributes from a record of Table A
to a record of Table B
, except the id
attribute?
For the example tables above, name
and email
fields should be copied.