This repository has been archived on 2024-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
redstoner.com/config/initializers/form_errors.rb
2014-04-04 01:08:17 +02:00

8 lines
293 B
Ruby

ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
if html_tag =~ /\<label/
html_tag
else
errors = Array(instance.error_message).join(',')
%(<span class="field_with_errors">#{html_tag}<span class="validation-error">#{errors}</span></span>).html_safe
end
end