Please sign in to comment.
Check if model responds to unscoped before locating many.
When attempting to locate many gids, if the first gid in the collection responded to `unscoped` the rest of the gids would be assumed to also respond to it, but that's unreliable. Instead, refactor UnscopedLocator to check if the model class responds to `unscoped` before finding and let the super locate if it doesn't. This uncovered that the unscoped check in `locator_for` should be moved into the UnscopedLocator. Then the unscoped locator can be the default locator. Fixes #82.
- Loading branch information
Showing with 19 additions and 9 deletions.