on 2009-02-03 13:37
on 2009-02-03 13:56
Do @task = @project.tasks.build and use that as the fields_for argument On 03/02/2009, at 21:37, Adam A. <rails-mailing-list@andreas-
on 2009-02-03 14:32
ahh i got confused between create and build. And the @task idea, dont know why i didnt think about that. Can i confirm that build doesnt actually add a blank task to @project but rather just returns one? Last im wondering how rest changes where i add code. In the above case when a user adds a new task to my project witin the project show view, where should i direct to? The create in the task controller or just update in the project controller (id create build the new task and then update the project model)? Im not sure whether rest encourages you to code as much as possible in the parent resource. Any tips would be greatly appreciated.