Format form fields for bootstrap using rails+nokogiri
- by user1116573
I have the following in an initializer in a rails app that uses Twitter bootstrap so that it removes the div.field_with_errors that rails applies when validation fails on a field but also the initializer adds the help/validation text after the erroneous input field:
require 'nokogiri'
ActionView::Base.field_error_proc = Proc.new do |html_tag,…