The source code is in the example,(http://guides.rubyonrails.org/ form_helpers.html#building-complex-forms the example of Handle Multiple Models in One Form from Advanced Rails Recipes ) I wanted to test that example by myself... that's why I didn't wrote any line of code
and yes, the call @project = Project.new exists On Jul 22, 6:00 am, Chris Kottom <[email protected]> wrote: > You didn't include any source code, and without that, no one is going to be > able to tell you for sure what you're doing wrong. The output here > indicates that the @project reference isn't being initialized. Is there > actually a call like @project = Project.new(...) in the action method? > > If this turns out not to be the problem, please include at least the full > ProjectsController#new source when you respond. > > > > > > > > On Fri, Jul 22, 2011 at 6:38 AM, Angelo Cordova <[email protected]> wrote: > > I tried to make this work > > >http://guides.rubyonrails.org/form_helpers.html#building-complex-forms > > > the example of > > > Handle Multiple Models in One Form from Advanced Rails Recipes > > > but, when I want to create a new project I get this error: > > > NoMethodError in ProyectsController#new > > > -------------------------------------------------------------------------------------------------------------------------------------- > > undefined method `tasks' for nil:NilClass > > > Rails.root: /home/angelo/prueba > > Application Trace | Framework Trace | Full Trace > > > app/controllers/projects_controller.rb:28:in `new' > > > Request > > > Parameters: > > > None > > > Show session dump > > > Show env dump > > Response > > > Headers: > > > None > > > ---------------------------------------------------------------------------------------------------------------------------------------------- > > > btw the line 28 in project controller is > > > @project.tasks.build > > > -- > > 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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

