Field error format question

(Alex Brinkman) #1

The push_type_admin module defines/overrides the ActionView::Base field_error_proc for formatting of form errors, I’m assuming to the markup that makes sense for Foundation. However that proc seems to carry over and affect my main_app’s error format, which causes a few layout issues. I was able to easily correct it by defining my own field_error_proc for my app (back to the default Rails format), but I wonder if it would be better for PushType to scope this proc to itself somehow. Thoughts?

(Aaron Russell) #2

How have you handled it? Are you just using the default Rails format everywhere (so in PushType too) or do you somehow return a conditional format depending on the scope? I’m not 100% sure how you’d scope one format to PushType and another to the main app.

In the long term this will become a non-issue - the new admin UI will do things differently. But that’s some time away so would be good to sort this in the interim.

(Alex Brinkman) #3

You’re right, I was overriding PushType’s format too. I don’t know of a solution to this either.