bcardarella/client_side_validations — pull request #432 by mjtko (2012-11-08 17:02:28+00:00)
Title: Prevent ReferenceError when rails.validations evaluated after DOM ready

A javascript `ReferenceError` occurs if the DOM is already ready when `rails.validations.js` is evaluated.

This is because the `ClientSideValidations` object hasn't been set up before the jQuery `ready` function is executed (which happens straight away in the case that the DOM is already ready!). Reordering in this way ensures that `ClientSideValidations` is always set up and populated in advance of the jQuery `ready` function being called.