Sha256: 15cf6946c24d45455717d529fd723feac36f02e2d4844be44fd071ad20331bd4
Contents?: true
Size: 443 Bytes
Versions: 42
Compression:
Stored size: 443 Bytes
Contents
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| error_class = "x-form-text x-form-invalid" if html_tag =~ /<(input|textarea|select)[^>]+class=/ class_attribute = html_tag =~ /class=['"]/ html_tag.insert(class_attribute + 7, "#{error_class} ") elsif html_tag =~ /<(input|textarea|select)/ first_whitespace = html_tag =~ /\s/ html_tag[first_whitespace] = " class='#{error_class}' " end html_tag end
Version data entries
42 entries across 42 versions & 1 rubygems