matharvard (owner)

Revisions

gist: 109160 Download_button fork
public
Public Clone URL: git://gist.github.com/109160.git
Embed All Files: show embed
Error messages by fields.rb #
1
2
3
4
5
6
7
8
9
10
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
  if instance.error_message.kind_of?(Array)
    %(#{html_tag}<span class="validation-error">&nbsp;
#{instance.error_message.join(',')}</span>)
  else
    %(#{html_tag}<span class="validation-error">&nbsp;
#{instance.error_message}</span>)
  end
end