Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute encryption with ActiveRecord::Encryption #149

Open
stephen-tech4 opened this issue May 21, 2023 · 1 comment
Open

Attribute encryption with ActiveRecord::Encryption #149

stephen-tech4 opened this issue May 21, 2023 · 1 comment

Comments

@stephen-tech4
Copy link

Hi, I would like to ask if there is any support for the StoreModel attribute with rails ActiveRecord::Encryption.

class User
    attribute :contact_info, ContactInfo.to_type
end

class ContactInfo
    include StoreModel

    attribute :email, :string # Attribute to be encrypted

    encrypts :email, deterministic: true, ignore_case: true # From ActiveRecord::Encryption
end

Is there a way to encrypt only the user.contact_info.email?

@DmitryTsepelev
Copy link
Owner

Hey hey! I know it works fine with https://github.com/ankane/lockbox, but no one added support for rails encryption. So if you're interested in this functionality — please check what's needed to be done to make it work (I guess we just need to implement a couple of methods) and I'll be there ready to review PR or provide any other help 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants