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

Don't change iv field when value is the same #284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 6, 2017

  1. Don't change iv field when value is the same

    ```
    user = User.new(name: 'hi')
    user.name = 'hi'
    ```
    
    That code would generate two different ivs.
    At first look that is not an issue, but when using attr_encrypted combined
    with ActiveRecord this could impose some issues. Like extra writes to the db.
    Also, marking some attributes as dirty, when they were actually not changed.
    
    [fixes attr-encrypted#216]
    arthurnn committed Dec 6, 2017
    Configuration menu
    Copy the full SHA
    73b64d3 View commit details
    Browse the repository at this point in the history