cthorner
2011-Jan-16 09:28 UTC
ActionController::RoutingError (undefined method `has_many'' for
I am getting an error with Rails 3.0.3 ActionController::RoutingError (undefined method `has_many'' for ParentsController:Class): app/controllers/parents_controller.rb:3 on that line I have has_many :children I have a corresponding belongs_to line in the ChildrenController class. I am not trying to do anything fancy here, just establishing a simple one to many relationship. Any suggestions as to what I might be doing wrong? Thanks, Carl -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Jan-16 12:11 UTC
Re: ActionController::RoutingError (undefined method `has_many'' for
On Jan 16, 9:28 am, cthorner <carl.thor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> on that line I have > has_many :children > > I have a corresponding belongs_to line in the ChildrenController > class. > > I am not trying to do anything fancy here, just establishing a simple > one to many relationship. Any suggestions as to what I might be doing > wrong?Relationships like that are specified in models, not controllers Fred> > Thanks, > Carl-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
cthorner
2011-Jan-17 00:43 UTC
Re: ActionController::RoutingError (undefined method `has_many'' for
Thanks On Jan 16, 4:11 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 16, 9:28 am, cthorner <carl.thor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > on that line I have > > has_many :children > > > I have a corresponding belongs_to line in the ChildrenController > > class. > > > I am not trying to do anything fancy here, just establishing a simple > > one to many relationship. Any suggestions as to what I might be doing > > wrong? > > Relationships like that are specified in models, not controllers > > Fred > > > > > > > > > > > Thanks, > > Carl-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.