gravityblast / web-app-theme

A simple theme for web apps
Other
2.45k stars 387 forks source link

Errors on Forms not rendered and styled #21

Closed berkes closed 13 years ago

berkes commented 13 years ago

in Rails 3, the @object.errors are not rendered.

Currently, it appears the best way to render error messages for a form trought the controller, by setting a flash[:error]. I am not sure if that is the cleanest way. Personally I prefer a less DRY way, by defining a simple shared/_error_messages.erb that is included in the forms.

Is the flash[:error] = ... in the Controller the preferred way for web-app-theme? If not, what would be the cleanest way; would such a partial be an option for inclusion?

gravityblast commented 13 years ago

I usually set ActionView::Base.field_error_proc as you can see in the README file to display errors after the form labels. In the flash[:error] I just set a simple message, not all the error messages