5

I'm looking for a working tutorial for Rails 3.1 that shows you step-by-step how to create a nested model that's 3 levels deep.

The "complex forms" screencasts on RailsCasts doesn't seem to be working, seeing that the code is 4+ years old.

theIV
  • 25,434
  • 5
  • 54
  • 58
imjp
  • 6,495
  • 10
  • 48
  • 58

2 Answers2

6

try looking at these tuts from railscasts(posted january last year)

http://railscasts.com/episodes/196-nested-model-form-part-1

and

http://railscasts.com/episodes/197-nested-model-form-part-2

I did initially have problems with deep nesting, but they all follow the same pattern, checkout the problems i faced with rails 3 below

Problems adding fields in nested form through jQuery form railscasts episode

How to limit nested form fields using jquery not working

hope this helps as deeply nested fields can be tricky at first

Community
  • 1
  • 1
Hishalv
  • 3,052
  • 3
  • 29
  • 52
  • I didn't even know about those nested model forms tutorials at rails casts! I'll take a look at those :) Thanks man. – imjp Jul 29 '11 at 14:23
3

I suggest you to try Rails guides/Rails API. There is no difference whether you have 1-level nesting or 10-level nesting the only thing you have to do is to understand the concepts behind the implementation if you'll do it yourself it would be much more effective than just copying source from article.

iafonov
  • 5,152
  • 1
  • 25
  • 21
  • I have been trying that tutorial, and have created another fairly simple application thanks to it since that tutorial explains a lot about how rails works but the problem with that tutorial is that it only nests 1 lvl deep.. my application is deeper and I have no idea how to handle it :/ – imjp Jul 29 '11 at 14:18