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

Can't really_destroy! translation #28

Open
BlackPPoint opened this issue Mar 14, 2017 · 0 comments
Open

Can't really_destroy! translation #28

BlackPPoint opened this issue Mar 14, 2017 · 0 comments

Comments

@BlackPPoint
Copy link

BlackPPoint commented Mar 14, 2017

I can't destroy my spree product because of it translation. From rails console:

shipping_category = Spree::ShippingCategory.create! name: 'Test shipping category'
# OK
product = Spree::Product.create! name: 'Product 1', price: 1.0, shipping_category: shipping_category
# OK
product.really_destroy!
# RuntimeError: Can't modify frozen hash

I beleave this is because of punch_slug method of the translation_class. This method calls on after_destroy, and when we really destroing object, we can't call update, because the object is frozen.

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