开发者

double accepts_nested_attributes_for

does anyone know if it is possible to do a double nested form for. so that i could upload images to a set from an article form.

开发者_运维知识库

e.g.

Article
  has_many :image_sets

ImageSet
  belongs_to :article
  has_many :images

Image
  belongs_to :image_set


Check out Railscasts #196, looks like he sets up two levels of nested attributes, maybe you can do something similar to that.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜