ruby on rails - Custom HTML Error Wrappers for Form Elements -
i find way customize default error html <div class="field_with_errors"></div> to take own classes: <div class="clearfix error"> <label for="errorinput">input error</label> <div class="input"> <input class="xlarge error" id="errorinput" name="errorinput" size="30" type="text"> <span class="help-inline">small snippet of text</span> </div> </div> i have found railscast 2007 uses rails 2, believe. http://railscasts.com/episodes/39-customize-field-error . seems rails 3 might have more friendly way customize html? also, doesn't show way add error class directly input want. the method explained in link posted still used today vanilla form builders in rails . so, if wanted wrap input mention, create method overriding actionview::base.field_error_pr...