hyper-mesh
hyper-mesh copied to clipboard
The project has moved to Hyperstack!! - Synchronization of active record models across multiple clients using Pusher, ActionCable, or Polling
When an anonymous create fails the object isn't destroyed, so the next time you create a record it actually tries to create two. I noticed this as I had a...
This code implements `has_and_belongs_to_many` in Hyperloop by using the existing `has_many :through` functionality and dynamically generating the join table. ```ruby if RUBY_ENGINE == "opal" module ActiveRecord module ClassMethods def has_and_belongs_to_many(assoc,...
should improve performance
this https://github.com/ruby-hyperloop/hyper-mesh/blob/ebf661eecc592799b7723bb666c1d42d84551918/lib/reactive_record/server_data_cache.rb#L182 reads every id, but is not protected by the `check_permission_with_acting_user` method it should read: ```ruby collection = cache_item.value.collect do |record| record.check_permission_with_acting_user(@acting_user, :view_permitted?, :id) record.id end cache_item.build_new_cache_item(collection, method, method)...
Proof of concept below. ```ruby class ApplicationRecord < ActiveRecord::Base self.abstract_class = true def self.exists?(*args) HyperMeshExists.run(model: name, args: args) end if RUBY_ENGINE == 'opal' class HyperMeshExists < Hyperloop::ServerOp param acting_user: nil,...
I have 2 components A and B. Both cause queries. When queries for component B are batched in with component A then the placeholder values in A are never resolved....
currently we don't give a lot of info back on failures when you do a `find` on a record that doesn't exist or when you don't have proper permissions. This...
When accessing associations on records that are subclassed, hyper-mesh only checks the associations on the records base_class ex code ```ruby class User < ActiveRecord::Base ... end class Administrator < User...
...specs are failing, unfortunately, locally (not for merge just yet, see comments).
There are many active-record methods that are not implemented in hyper-model. In some cases not having these methods can cause strange failures that are hard to diagnose. Instead we should...