You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
Currently, the set_stores callback is called before an update is made to a Productor to one of its associations via nested attributes. In the latter case, this causes the product to dissociate from the store (or stores) because the store_ids aren't passed in the parameters, effectively meeting the condition which I think was meant to work only if you are editing the product details, specifically, if this product would be part of this or that store. This is indeed buggy behavior.
The following feels like a sketchy workaround, but it does the job:
Related (hopefully) to #97.
Currently, the
set_stores
callback is called before an update is made to aProduct
or to one of its associations via nested attributes. In the latter case, this causes the product to dissociate from the store (or stores) because thestore_ids
aren't passed in the parameters, effectively meeting the condition which I think was meant to work only if you are editing the product details, specifically, if this product would be part of this or that store. This is indeed buggy behavior.The following feels like a sketchy workaround, but it does the job:
Does any of this make any sense? Could I achieve what I want in another, better way?
Thanks a lot,
H.
The text was updated successfully, but these errors were encountered: