record saving problem

I have some active_record models which have same columns, for

model A (int id, vchar name, vchar code)
model B (int id, vchar name, vchar code)

I can initiate a new model B object using "b =", assuming that I
already have an "a" acquired by A.find(), how can I assign the column
values of "a" to object "b" easily like:

b =

attributes = a.attributes = nil
b = attributes )

Actually, there's no need to nil the id because you can't mass-assign the id.

b =

would have exactly the same effect.


Rob Biedenharn

I have 47 models with matching history models that will disagree. If
I don't nil the id it complains.