Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that entire collection has been loaded before short circuiting #37747

Commits on Nov 19, 2019

  1. Check that entire collection has been loaded before short circuiting

    Currently, when checking that the collection has been loaded, only the first
    record is checked. In specific scenarios, if a record is fetched via an `after_initialize`
    hook, there is a chance that the first record has been loaded, but other records in the
    collection have not.
    
    In order to successfully short circuit the fetching of data, we need to verify that
    all of the records in the collection have been loaded.
    
    * Create test for edge case
    * Move `reset_callbacks` method to `cases/helper`, since it has been defined in multiple
      locations.
    
    Closes rails#37730
    bradleyprice committed Nov 19, 2019
    Copy the full SHA
    0a5b41c View commit details
    Browse the repository at this point in the history