html.erb Agregar condicionalmente clase

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