Sha256: bc225d70129952da21b9e72d685c88d8383cea5e983328b6f4255496930f82f1
Contents?: true
Size: 395 Bytes
Versions: 7
Compression:
Stored size: 395 Bytes
Contents
# put rails errors inline on the tags themselves ActionView::Base.field_error_proc = ( Proc.new do |html_tag, instance| class_name = "error" d = HTML::Document.new(html_tag) tag = d.root.children.first if tag.attributes.has_key?('class') tag.attributes["class"] += " #{class_name}" else tag.attributes["class"] = class_name end tag.to_s.html_safe end)
Version data entries
7 entries across 7 versions & 3 rubygems