I\'m using rails (5.2.4.3), ransack, and postgres with the following simplified db schema:
Buildings - id BuildingSegments - id - building_id - name <
Buildings - id BuildingSegments - id - building_id - name