justinfrench/formtastic — Issue #714: Getting Inline Errors to Show for Nested Fields
Author: coreyward
Created: 2011-10-11 21:50:48+00:00
State: open

I'm having trouble getting inline errors to show up for nested fields with Formtastic. My models are set to go with `accepts_nested_attributes_for` and I have a `validates_associated` call as well. The errors hash, if I check it manually, spits out the `associated_model_name.attribute_name` key referencing the error message as a value, so the validation is working, but it doesn't look like Formtastic is paying it any attention. I tried digging into the Base::Errors module, but I'm wicked lost on what's happening (esp. with `error_keys`).

I've put the relevant pieces of code in a Gist. This is obviously drastically simplified in terms of the number of attributes/validations/hooks, but it should give an idea of how I have this setup: https://gist.github.com/1276547

Using Rails 3.0.10 and Formtastic 2.0.2 with Ruby 1.9.2.