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

Users can't be really destroyed #431

Open
artplan1 opened this issue Apr 13, 2018 · 0 comments
Open

Users can't be really destroyed #431

artplan1 opened this issue Apr 13, 2018 · 0 comments

Comments

@artplan1
Copy link
Contributor

When I'm trying to really_destroy! user I receive:

Traceback (most recent call last):
        2: from (irb):18
        1: from app/models/spree/user_decorator.rb:62:in `scramble_email_and_password'
RuntimeError (Can't modify frozen hash)

Line 62 is:

self.email = 'deleted_' + SecureRandom.uuid.first(5) + email

What if we move scramble_email_and_password to before_destroy callback and don't call save in it?

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

1 participant