# Noob -- Relational controller actions question

**URL:** <https://www.ruby-forum.com/t/noob-relational-controller-actions-question/140130>\
**Category:** Rails\
**Created:** [June 11, 2008, 4:38am UTC](https://www.ruby-forum.com/t/noob-relational-controller-actions-question/140130 "2008-06-11T04:38:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![validkeys](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/da6949/32.png) [@validkeys](https://www.ruby-forum.com/u/validkeys)\
**Post date:** [June 11, 2008, 4:38am UTC](https://www.ruby-forum.com/t/noob-relational-controller-actions-question/140130/1 "2008-06-11T04:38:55Z")

</div>

Hey Guys,

Just a quick question. Let’s say that i have a todo list app. One  
todolist can have many todo\_items.

I had read that in the RESTful routing, you want to have a max of 7 or  
so actions in a controller before you have to start defining more  
actions in the routes. So lets say I wanted to create a new todo\_item  
for my todolist. Would I post the form to the todo\_items controller or  
should I post the form to the Todolist controller with a new action  
called add\_item or something like that?

Mainly, I just want to know what the “Right” way to do this is…

Any help you can give me, I would greatly appreciate

Thanks!

---

<div class="post-metadata">

**Author:** ![validkeys](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/da6949/32.png) [@validkeys](https://www.ruby-forum.com/u/validkeys)\
**Post date:** [June 11, 2008, 8:01am UTC](https://www.ruby-forum.com/t/noob-relational-controller-actions-question/140130/2 "2008-06-11T08:01:55Z")

</div>

It’s not just 7 or so actions, its 7 specific actions for a  
controller:

index  
show  
new  
edit  
create  
update  
destroy

You don’t have to use all of them, you might have a controller that  
just implements the index action for example. When you are  
considering adding an action outside of these 7 another controller  
might be a better answer.

For your todo app a new TodoItem would likely be processed by the  
TodoItemsController create action.

Aaron
