Skip to content

Users can't be really destroyed #431

@artplan1

Description

@artplan1

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions