Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

scopes with client lambdas will not get updated #88

Open
catmando opened this issue Apr 18, 2018 · 1 comment
Open

scopes with client lambdas will not get updated #88

catmando opened this issue Apr 18, 2018 · 1 comment

Comments

@catmando
Copy link
Contributor

on the same client that makes an update.

I.e. if data is updated on server and is broadcast then all is well
but if data is updated on one client, then that client will not get updated

probably because when update_filter_scope in scoped_collection.rb runs, the local data is already updated, so that there is no "difference" before and after.

solution is probably around checking the "before" values returned from the server against what is in the client. If the value is "before" does not equal the current value (but instead equals the new value) then we know we have to change the record so that it matches what is coming down from the server.

FYI this can fix another problem and that is that models that are not kept in sync. In this case we should simulate the "before->after" json returned from the server and use this to update the scopes. Or we could return the "broadcast" data with the update/save.

@catmando
Copy link
Contributor Author

closed ab8637b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant