Skip to content

Errors on nested forms not displayed #45

@matwithers

Description

@matwithers

Hi

I'm having problems getting the validation errors on nested form attributes styled. For example one of the models in my app is 'company' and it accepts nested attributes for 'location'. My new company form has a section for:

<%= f.fields_for :location_attributes do |loc| %>
. . .
<% end %>

The form renders and creates objects fine. But if the location fails validation no error styles are generated (I'm using ActionView::Base.field_error_proc in my environment.rb) although errors in the 'company' portion of the form are highlighted/displayed fine.

Any ideas ?

Thanks

Mat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions