ruby-hyperloop / hyper-mesh

The project has moved to Hyperstack!! - Synchronization of active record models across multiple clients using Pusher, ActionCable, or Polling
https://hyperstack.org/
MIT License
22 stars 12 forks source link

allow build (and push) to work on scopes #64

Open catmando opened 6 years ago

catmando commented 6 years ago

active record allows you to push and build on a scope, and the attributes will be automatically filled in to match the scope.

This is probably doable by doing something like this:

as each scope is processed (on the server) we figure out the attribute-value pairs for the scope and same them in a structure inside the AR base i.e. {model-class: {scope: {attr: val, attr: val}, scope: ... }, model-class ...}

then during the setup for the client download we dump this structure to the client.

Lots of work for a feature I doubt many people know exists.