reidmorrison/symmetric-encryption — pull request #29 by astjohn (2014-01-30 21:09:29+00:00)
Title: Fix coercion

Fixes #28

These changes attempt to coerce values according to their field types on the setters. This is necessary because we might create a model straight from rails parameters and parameter values can sometimes be strings. Usually, the ORM will take care of this subtlety.

For example, a boolean from a submitted form might take the value of `"1"` instead of `true`. If the values are not coerced, then some unintended consequences will follow such as model validations failing.