dgo
2008-Jan-26 15:51 UTC
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
brewpoo
2008-Jan-26 17:49 UTC
Re: empty Model creates DangerousAttributeError and connection is defined by ActiveRecord
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. On Jan 26, 10:51 am, dgo <danielgo...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
dgo
2008-Jan-27 10:29 UTC
Re: empty Model creates DangerousAttributeError and connection is defined by ActiveRecord
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 On 26 Jan., 19:49, brewpoo <jloch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > On Jan 26, 10:51 am, dgo <danielgo...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---