Skip to content

Instantly share code, notes, and snippets.

@eduardordm
Created February 1, 2013 13:56
Show Gist options
  • Save eduardordm/4691440 to your computer and use it in GitHub Desktop.
Save eduardordm/4691440 to your computer and use it in GitHub Desktop.
zurb form helper errors
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
unless html_tag =~ /^<label/
errors = Array(instance.error_message).join(',')
%(<div class="error">#{html_tag}<small class="error">&nbsp;#{errors}</small></div>).html_safe
else
%(<div class="error">#{html_tag}</div>).html_safe
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment