wvanbergen/activerecord-database_validations — pull request #2 by wvanbergen (2014-10-13 22:08:57+00:00)
Title: Initial implementation of validation based on 

This is a basic implementation of the ideas we discussed before about automatically validating database constraints. This implementation simply inspects the schema of the class, and creates validators based on the column definition.

- NOT NULL, and no default value: **PresenceValidator**. Note: this is slightly different than the database constraint, because it checks for `.blank?` instead of `.nil?`
- Textual column, and limit is defined? **LengthValidator**.

One thing to note is that the validators are created lazily, i.e. the first time a record is validated. This prevents leading the schema of the table at boot time.

@fw42 @byroot @jduff for review. Do we want more constraints? Configuration options? Test coverage?