lib/masterfiles/repositories/location_repo.rb
# Get the ids of all pallets in a location.
# If recursive is true, get pallet ids in the location and all its sub-locations.
Get the ids of all pallets in a location.
If recursive is true, get pallet ids in the location and all its sub-locations.
Get the ids of all pallets in a location . If recursive is true get pallet ids in the location and all its sub - locations .
def location_pallet_ids(location_id, recursive: false)
      return select_values(:pallets, :id, location_id: location_id) unless recursive
      location_ids = DB[:tree_locations].where(ancestor_location_id: location_id).select_map(:descendant_location_id)
      select_values(:pallets, :id, location_id: location_ids)
    end
def location_pallet_ids ( location_id , recursive : false ) return select_values ( :pallets , :id , location_id : location_id ) unless recursive location_ids = DB [ :tree_locations ] . where ( ancestor_location_id : location_id ) . select_map ( :descendant_location_id ) select_values ( :pallets , :id , location_id : location_ids ) end
Get the ids of all pallets in a location.
Get the ids of all pallets in a location .
location_id
<not_specific>
recursive
<not_specific>