jcasimir/draper — Issue #52: Decorators in forms don't handle nested attributes
Author: henrik
Created: 2011-10-17 11:30:57+00:00
State: open

Didn't have the time to dig into this as much as I'd like, but:

Say I have a form like

form_for(@item) { |f| f.fields_for :subitem { |sf| sf.text_field :name } }

and the item has

accepts_nested_attributes_for :subitem

If `@item` is a regular model, the nested attributes will be `item[subitem_attributes][name]` etc.

But if it is a decorator, the nested attributes will be `item[subitem][name]` etc which breaks.