# Flash\[:notice\] with remote\_format\_for

**URL:** <https://www.ruby-forum.com/t/flash-notice-with-remote-format-for/131194>\
**Category:** Rails\
**Created:** [March 6, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/flash-notice-with-remote-format-for/131194 "2008-03-06T21:03:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grayson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@grayson](https://www.ruby-forum.com/u/grayson)\
**Post date:** [March 6, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/flash-notice-with-remote-format-for/131194/1 "2008-03-06T21:03:48Z")

</div>

This has been asked before but I didn’t find an elegant solution. How  
do you display validations errors when you’re doing a remote\_format\_for  
(or in my case form\_for with UJS)

This is what I came up with in the partial but there was to be a more  
elegant solution also this displays the field names with underscores,  
the flash[:notice] way seems to display cleaned up business named

\<% @user.errors.each do |key,value| %\>  
\<%= key %\> \<%= value %\>  
\<% end -%\>

Thanks,

GP
