Rails 3.1:有关深度嵌套模型的任何教程吗? [英] Rails 3.1: Any tutorials for deeply nested models?
问题描述
我正在寻找Rails 3.1的有效教程,该教程逐步向您展示如何创建3级深度的嵌套模型.
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.
在RailsCasts上,复杂表单"截屏要工作,请确认代码已使用了4年以上.
The "complex forms" screencasts on RailsCasts doesn't seem to be working, seeing that the code is 4+ years old.
推荐答案
尝试从railscasts(去年1月发布)中查看这些tut.
try looking at these tuts from railscasts(posted january last year)
http://railscasts.com/episodes/196-nested -model-form-part-1
和
http://railscasts.com/episodes/197-nested -model-form-part-2
起初我确实在深度嵌套方面遇到了问题,但是它们都遵循相同的模式,请检查一下我在下面的rails 3中遇到的问题
I did initially have problems with deep nesting, but they all follow the same pattern, checkout the problems i faced with rails 3 below
通过以下方式以嵌套形式添加字段的问题jQuery表单Railscasts情节
希望这会有所帮助,因为一开始嵌套的字段可能会很棘手
hope this helps as deeply nested fields can be tricky at first
这篇关于Rails 3.1:有关深度嵌套模型的任何教程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!