Fixed a bug in where formulation when input was an array of symbol values, made db_code() return nil if the attribute is not enum'ed, and added more tests.