# Controller structures

**URL:** <https://www.ruby-forum.com/t/controller-structures/132868>\
**Category:** Rails\
**Created:** [March 25, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/controller-structures/132868 "2008-03-25T13:51:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![atmorell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/50afbb/32.png) [@atmorell](https://www.ruby-forum.com/u/atmorell)\
**Post date:** [March 25, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/controller-structures/132868/1 "2008-03-25T13:51:24Z")

</div>

Hello,

I am building a small test application for learning RoR. I understand  
most of what is going on and all my relations is set up correctly.  
(tested with console) I can’t figure out when to spilt out models into  
separate controllers. Is it overkill to create a controller for each  
model? Let me give an example.

Users -\> Pos -\> Comments

The show post page will display the Post and it’s comments. At the  
moment I got a Post controller with CRUD (R both post and comments)  
and a Comments controller with CUD. Would it make sense to merge these  
two controllers into one controller?

Best regards.  
Asbjørn Morell.

---

<div class="post-metadata">

**Author:** ![atmorell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/50afbb/32.png) [@atmorell](https://www.ruby-forum.com/u/atmorell)\
**Post date:** [March 25, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/controller-structures/132868/2 "2008-03-25T14:17:01Z")

</div>

It’s a design decision, but I think yes if only so that you easily get  
seperate views/view helpers as I’m sure a Post and a Comment will look  
different.

If you have lots of similar bits it each then you can put them in a  
module/mixin in the lib directory.
