jmazzi/crypt_keeper — pull request #15 by jmazzi (2012-10-11 17:30:11+00:00)
Title: PostgreSQL expects strings when using pgp_sym_encrypt/decrypt functions.

Passing an integer to an encrypted attribute causes this error to be raised:

ActiveRecord::StatementInvalid: PG::Error: ERROR: function
pgp_sym_encrypt(integer, unknown) does not exist
LINE 1: SELECT pgp_sym_encrypt(1, '...

Since encrypt= is the only method that deals with user provided data, I am
only patching it in the encrypt= method. decrypt= reads values from the db
which are strings at that point.