Subforms are handling weird hidden/excluded AS fields.
Let’s say you want to generate the :name field of a record instead letting the user to edit/modify. In normal case you’ll do the following exclusions in active_scaffold config:
1 2 3 | config.create.columns.exclude :name config.update.columns.exclude :name |
But if this record is associated and it will be shown as a subform in some another view the :name column will be also excluded from the subform’s header.
In order to fix it, do not exclude :name in active_scaffold configuration, instead create an empty form override for this column (name_form_column.rhtml).


