I'm using the simple_form gem in Rails to create a form. To handle the server side errors I'm using:
<%= f.error_notification %>
And when the form is submitted and server-side errors are generated, they're generated in a p tag like so:
<p class="error_notification">Here are all the errors....</p>
I want wrap a div around the p element, because I'd like to create a red background for the message container via CSS, and I don't want to style the P element directly. Is there some way to do this inside of Rails with simple_form?
div
-element being empty when there is no error? If not, just put<div>
and</div>
around theerror_notification
:) – Veger