mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Making sure that only distributor enterprises are displayed on the landing page.
This commit is contained in:
@@ -15,8 +15,8 @@ class HomeController < ApplicationController
|
||||
region[:name] = region_data["name"]
|
||||
distributors = []
|
||||
region_data["distributors"].each do |distributor_data|
|
||||
distributor = Enterprise.find_by_name(distributor_data["name"])
|
||||
distributors << distributor unless distributor.nil?
|
||||
enterprise = Enterprise.find_by_name(distributor_data["name"])
|
||||
distributors << enterprise if !enterprise.nil? && enterprise.is_distributor
|
||||
end
|
||||
region[:distributors] = distributors
|
||||
@regions << region
|
||||
|
||||
@@ -37,28 +37,29 @@ staging:
|
||||
regions:
|
||||
- name: "Inner Melbourne"
|
||||
distributors:
|
||||
- name: "AB Organics"
|
||||
- name: "Biodynamic Marketing"
|
||||
- name: "Carefully selected"
|
||||
- name: "Ballantyne (Thornbury)"
|
||||
- name: "Childcare Center Near You"
|
||||
- name: "Northcote Bulk Foods Coop :)"
|
||||
|
||||
- name: "South East Melbourne"
|
||||
distributors:
|
||||
- name: "Common Fields"
|
||||
- name: "Great Western Olives"
|
||||
- name: "Kindred Organic"
|
||||
- name: "LO"
|
||||
- name: "Delivery (Cafes / Restaurants only)"
|
||||
- name: "Grow Lightly (Inverloch)"
|
||||
- name: "Grow Lightly (Korumburra)"
|
||||
- name: "Grow Lightly (Leongatha)"
|
||||
|
||||
- name: "Mildura"
|
||||
distributors:
|
||||
- name: "Manna Hill Olives"
|
||||
- name: "Matt's Patch"
|
||||
- name: "Old McDonald's Daughter"
|
||||
- name: "LO"
|
||||
- name: "Murrnong"
|
||||
- name: "Murrnong (Violet Town)"
|
||||
|
||||
- name: "South East Gippsland"
|
||||
distributors:
|
||||
- name: "Paddock to Plate"
|
||||
- name: "Powlett Hill"
|
||||
- name: "Urban Honey Co"
|
||||
- name: "Neighbourhood Coop"
|
||||
- name: "Northcote Bulk Foods Coop :)"
|
||||
- name: "Murundaka (Heidelberg)"
|
||||
- name: "PepperTree Place (Coburg)"
|
||||
|
||||
production:
|
||||
regions:
|
||||
|
||||
Reference in New Issue
Block a user