html.erb Ajouter conditionnellement la classe

<div class="<%= @error ? 'error-class' : 'normal-class' %>">
Ukulily