← Graph

Default scope for region preview

concept 1 connections

Despite default_scope being widely considered a Rails anti-pattern, Miron recommends it for previewing how each region's dataset will look after bucketing: define a default_scope that filters by the bucket column, then query the app as if already split. Used only during the migration as a verification tool.

category
practice
about
Default scope for region preview concept
Uses a Rails default_scope on the bucket column to preview per-region data before split.

Provenance

Read by
4 extractions