How associations are updated with Synchromesh and ReactiveRecord
<p>How do you get Synchromesh to update Reactive Record associations? </p>

<p>If you consider the following model:</p>

<pre><code># models/public/post.rb
class Post &lt; ActiveRecord::Base
  has_many :comments
end

# models/public/comments.rb
class Comment &lt; ActiveRecord::Base
  belongs_to :post
end
</code></pre>

<p>And a component that is rendering all Posts and Comments:</p>

<pre><code>def render
  ul do
  Todo.all.each do |todo|
    li { todo.title }
    ul do
      todo.things.each do |thing|
        li { thing.name }
      end
    end
  end
end
</code></pre>

<p>The behaviour I am seeing is that any update to a Post or Comment is correctly pushed to the client and the component renders the update correctly. </p>

<p>However, if a new Thing is created (for a Todo being rendered), the new record arrives as a pushed notification but the list of things is not updated dynamically. (A page refresh does render the new Thing).</p>

<p>I have tried adding a scope to Todo but this does not make a difference.</p>

<pre><code>scope :all_with_things, -&gt; () { joins(:things) }, [Thing]
</code></pre>

<p>What is the best way of getting ReactiveRecord and Synchromesh to recognise a new Thing belonging to a Todo?   </p>