Skip to content

loading a parent scope should trigger client side scoping of children #82

Closed
@catmando

Description

@catmando

related to #78.

For example:

# assume the active scope has a client side filter method

Todo.all.active.count # request just the count but not the whole scope
Todo.all.each ...  # fetch the parent scope
... # later after parent scope has finished loading
Todo.all.active.each ... # this unnecessarily loads active from server

The problem all.active collection is created first, and linked to all (the parent)
but parent does not have loaded collection yet, so we skip filtering.

perhaps calling sync_collection_with_parent in the all method could fix it easily?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions