Hello all, I''m doing something similar to a blog. Each post can have comments. Should I put the add comment action under the post controller or the comment controller? Right now I have it on the comment controller, but I have to pass the game id into these functions, and it seems kind of backwords. My urls look like this /comments/new/4 (to add a new comment to post #4) Should I have just created a comment model and not a comment controller? 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 -~----------~----~----~----~------~----~------~--~---
Sean Clark Hess wrote:> Hello all, > > I''m doing something similar to a blog. Each post can have comments. > Should I put the add comment action under the post controller or the > comment controller? > > Right now I have it on the comment controller, but I have to pass the > game id into these functions, and it seems kind of backwords. My urls > look like this > > /comments/new/4 (to add a new comment to post #4) > > Should I have just created a comment model and not a comment > controller? > > Thanks!I strictly recommend you to read this tutorial for a better understanding http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial -- 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 -~----------~----~----~----~------~----~------~--~---
Thank you, I''ll do that On Jul 9, 9:39 pm, Rambo Rambo <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Sean Clark Hess wrote: > > Hello all, > > > I''m doing something similar to a blog. Each post can have comments. > > Should I put the add comment action under the post controller or the > > comment controller? > > > Right now I have it on the comment controller, but I have to pass the > > game id into these functions, and it seems kind of backwords. My urls > > look like this > > > /comments/new/4 (to add a new comment to post #4) > > > Should I have just created a comment model and not a comment > > controller? > > > Thanks! > > I strictly recommend you to read this tutorial for a better > understandinghttp://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-fir... > > -- > 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---