Mitch VanDuyn
Mitch VanDuyn
1) Add this file to app/models/application_record.rb ```ruby # app/models/application_record.rb # the presence of this file prevents rails migrations from recreating application_record.rb see https://github.com/rails/rails/issues/29407 require 'models/000_application_record.rb' ``` 2) Then your real...
See HyperMesh broadcast.rb for an example of where the same pattern of checking whether we are on the console or not, and then deciding to either run or call remote....
when using auth_logic (for example) when a logged user makes ANY request to the server, this updates the user model, which causes data to be pushed to the client which...
```ruby class ActiveRecord::Base def to_key backing_record.object_id end end ``` See https://github.com/ruby-hyperloop/hyper-react/issues/244 for details
HyperMesh does a temporary save of related records inside of a rolled back transaction *without validations* so that the client state is setup on the server. This is fine unless...
reported by @sfcgeorge
some aliases of belongs_to have a signature like this: `attr_name, scope = nil, opts = {}`, but in reality, it must be `attr_name, *args`.
These specs will fail: ```ruby it "can validate the presence of an association" do TestModel.validates_presence_of :child_models expect_promise do @test_model = TestModel.new @test_model.child_models
if for some reason you want to insure all attributes are loaded you have to say: ```ruby # trip is some record instance ... Hyperloop::Model.load do trip.attr1 trip.attr2 trip.attr3 trip...