开发者

Is there any good way to implement nested form in Rails 3?

I've been trying to find a decent solution for nested form,开发者_开发百科 but I couldn't find any tutorial or blog on this topic. Please come and rescue.


Firstly, you'll want to check our Ryan's screencast: http://railscasts.com/episodes/196-nested-model-form-part-1

Once you've seen the tutorial, you'll want to play around with the nested_form_for gem: https://github.com/ryanb/nested_form

If you need to see it in action, I've done a working carrierwave+nested form example here: https://github.com/galaxylord/carrierwave_nested

You can always poke around the rails guides as well for some examples: http://guides.rubyonrails.org/routing.html#nested-resources

Hope this puts you on the right track!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜