I have a model called Test. In the controller I have @circuit Test.new. Any ideas why rails is complaining about the ''new'' method?? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Brian Hogan
2008-Jul-28 17:08 UTC
Re: getting error Unknown method ''new'' for a new model instance
Test is a reserved word. It''s for a Unit test. Change your table and model name to something else, like Exam or something. On Mon, Jul 28, 2008 at 11:42 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I have a model called Test. In the controller I have @circuit > Test.new. Any ideas why rails is complaining about the ''new'' method?? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Me
2008-Jul-28 17:50 UTC
Re: getting error Unknown method ''new'' for a new model instance
uggh. Thanks. I never do any ruby testing so I forgot about that. DOH!! On Jul 28, 12:08 pm, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Test is a reserved word. It''s for a Unit test. Change your table and model > name to something else, like Exam or something. > > On Mon, Jul 28, 2008 at 11:42 AM, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I have a model called Test. In the controller I have @circuit > > Test.new. Any ideas why rails is complaining about the ''new'' method??--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Brian Hogan
2008-Jul-28 21:50 UTC
Re: getting error Unknown method ''new'' for a new model instance
Shame on you :) On Mon, Jul 28, 2008 at 12:50 PM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > uggh. Thanks. I never do any ruby testing so I forgot about that. > DOH!! > > On Jul 28, 12:08 pm, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Test is a reserved word. It''s for a Unit test. Change your table and > model > > name to something else, like Exam or something. > > > > On Mon, Jul 28, 2008 at 11:42 AM, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I have a model called Test. In the controller I have @circuit > > > Test.new. Any ideas why rails is complaining about the ''new'' method?? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---