# New Comments for Posts in a blog

**URL:** <https://www.ruby-forum.com/t/new-comments-for-posts-in-a-blog/142663>\
**Category:** Rails\
**Created:** [July 10, 2008, 5:21am UTC](https://www.ruby-forum.com/t/new-comments-for-posts-in-a-blog/142663 "2008-07-10T05:21:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_CSHess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Post date:** [July 10, 2008, 5:21am UTC](https://www.ruby-forum.com/t/new-comments-for-posts-in-a-blog/142663/1 "2008-07-10T05:21:22Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Sean\_CSHess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Post date:** [July 10, 2008, 5:39am UTC](https://www.ruby-forum.com/t/new-comments-for-posts-in-a-blog/142663/2 "2008-07-10T05:39:01Z")

</div>

Sean C. 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

> **[Rolling with Rails 2.0 - The First Full Tutorial - Part 1 | AkitaOnRails.com](https://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial)**
>
> for brazilians: click here.
> I am very happy to see that my Rails 2.0 Screencast was very well received. More than 1,500 unique visitors watched it...

---

<div class="post-metadata">

**Author:** ![Sean\_CSHess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Post date:** [July 10, 2008, 2:06pm UTC](https://www.ruby-forum.com/t/new-comments-for-posts-in-a-blog/142663/3 "2008-07-10T14:06:26Z")

</div>

Thank you, I’ll do that

On Jul 9, 9:39 pm, Rambo R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
