Empty Model creates DangerousAttributeError and connection is defined by ActiveRecord

Dear list,

The following situation drives me crazy.

I have one model called AlumniMember and one AlumniData. Both filled
with code. I developed both on Rails 1.2.3. Now I update the App to
Rails 2.0.2. Now the following happens, always when I call
AlumniData.new I get the DangerousAttributeError.

First I cleaned out the Model, the only line I left is
“has_one :alumni_member”. Same error. The I cleaned that line too:
guess… same error.

F%&/ it, I thought and got rid of the model with “script/destroy model
AlumniData”. The I recreated the model . . . same error. Rails always
writer the following message: “connection is defined by ActiveRecord”

Please somebody, is there help. What is the problem.

Thank you very much!!

Daniel

Please provide the migrations or db:schema for the two models. I
believe, that error means than an attribute name conflicts with a
reserved name.

Hei brewpoo,

yes you are right! Last night I found out this was the problem. I had
in my table a column called “connection”. Renaming this solved the
problem!

Thank you very much for your help!

daniel