attr-encrypted / attr_encrypted

Generates attr_accessors that encrypt and decrypt attributes
MIT License
2.01k stars 427 forks source link

Error selecting columns with attr_encrypted #331

Open yachtcaptain23 opened 5 years ago

yachtcaptain23 commented 5 years ago

Hey I'm at a loss here. You can peak at our code specified here: https://github.com/brave-intl/publishers/blob/staging/app/models/publisher.rb

Anyways, I'm having trouble running Publisher.select(:id) as you can see from the result:

2.3.8 :001 > Publisher.select(:id)
(Object doesn't support #inspect)
 =>

I don't understand as this is our current attr_encrypted variables:

attr_encrypted :authentication_token, key: :encryption_key
attr_encrypted :uphold_code, key: :encryption_key
attr_encrypted :uphold_access_parameters, key: :encryption_key

Running any query without a select works seeming fine.

atebit commented 5 years ago

getting the same thing..

atebit commented 5 years ago

any table that has saved encrypted_ is now dead to my rails console