Skip to content

Duplicate items in the collection #239

@ollieh-m

Description

@ollieh-m

When I create a new object, the collection of objects that gets pulled in by the client duplicates the new object, even though it is only created once in the database and on refreshing the client it only gets pulled in once.

I use .$save to create a new 'messageboard', and I use .all() to pull in all messageboards. The bug happens:

  • when I've gone into a particular messageboard (at /messageboards/:id) then gone back to the index - then when I create a new messageboard it appears two or three times in the collection of messageboards;
  • only in the client that has created the messageboard - in another browser the new messageboard only appears once;
  • because of something to do with what's being broadcast - I've done console.log() on the messageboards returned by .all() and the array includes the new messageboard two or three times, so the problem is to do with what's actually being broadcast, not how I'm displaying messageboards;

Here's the branch where the bug is happening - the angular app is in app/assets/javascripts

Other than this very strange issue, the gem's working great for me. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions