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
On Jun 10, 8:37 pm, validkeys
<kyle.da...-s5CVtH8h5JrZ3NRrNVlbw1aTQe2KTcn/@public.gmane.org>
wrote:> 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!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---