Im trying to follow the railscasts complex forms tutorial, but im doing it with :through realted tables and im having some problems. Ive made a pastie of the error and related files so its easier to read: http://pastie.caboo.se/181691 Any thoughts? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Steven Harrison wrote:> Im trying to follow the railscasts complex forms tutorial, but im > doing it with :through realted tables and im having some problems. > > Ive made a pastie of the error and related files so its easier to > read: http://pastie.caboo.se/181691 > > Any thoughts? Thanks.run ruby -c file_name on each file to make sure they pass [I guess they do] do a require_dependency in one of the other? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> do a require_dependency in one of the other?Thanks for your reply, but could you explain abit more please? Thanks. On Apr 16, 6:35 pm, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Steven Harrison wrote: > > Im trying to follow the railscasts complex forms tutorial, but im > > doing it with :through realted tables and im having some problems. > > > Ive made a pastie of the error and related files so its easier to > > read:http://pastie.caboo.se/181691 > > > Any thoughts? Thanks. > > run ruby -c file_name > on each file to make sure they pass [I guess they do] > do a require_dependency in one of the other? > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Steven Harrison wrote:>> do a require_dependency in one of the other? > Thanks for your reply, but could you explain abit more please? Thanks. > > On Apr 16, 6:35 pm, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>ruby -c is ruby -c app/models/orders_... # should say ok doing require_dependency would be at the top of one file,w here it errs, add require_dependency ''app/models/orders_sandwiches'' I wonder if class OrdersSandwiches < ActiveRecord::Base should be OrdersSandwich though :P -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks again Roger. Yea you were right, the problem was with the name of the join table and model. I thought that was the naming convention, but thats apparently for has_and_belongs_to_many, and its better to have a meaningful singular name for the join table using :through. Thanks again ;) On Apr 16, 7:39 pm, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Steven Harrison wrote: > >> do a require_dependency in one of the other? > > Thanks for your reply, but could you explain abit more please? Thanks. > > > On Apr 16, 6:35 pm, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > ruby -c is > ruby -c app/models/orders_... > # should say ok > > doing require_dependency > would be > at the top of one file,w here it errs, add > require_dependency ''app/models/orders_sandwiches'' > > I wonder if > class OrdersSandwiches < ActiveRecord::Base > should be OrdersSandwich > though :P > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Yea you were right, the problem was with the name of the join table > and model. I thought that was the naming convention, but thats > apparently for has_and_belongs_to_many, and its better to have a > meaningful singular name for the join table using :through. >I agree--their naming syntax is somehow lacking, in this instance :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---