From a782cbf5752c5e528ffd733e688ac2ce34dcce6a Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Thu, 3 Dec 2009 12:38:52 +0000 Subject: Move span/div fix into its own lib file --- lib/use_spans_for_errors.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/use_spans_for_errors.rb (limited to 'lib/use_spans_for_errors.rb') diff --git a/lib/use_spans_for_errors.rb b/lib/use_spans_for_errors.rb new file mode 100644 index 000000000..cda05c588 --- /dev/null +++ b/lib/use_spans_for_errors.rb @@ -0,0 +1,12 @@ +# Monkeypatch! Use SPAN instead of DIV. +# +# Rails core refuse to fix this properly, by making it an official option. +# Without it, you will get HTML validation errors in various places where an +# error appears within a P. +# +# A monkeypatch will have to do. +# +# See http://dev.rubyonrails.org/ticket/2210 + +ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| %(#{html_tag})} + -- cgit v1.2.3