diff --git a/app/controllers/api/v1/divisions_controller.rb b/app/controllers/api/v1/divisions_controller.rb index be33df912..5c7ce4fa4 100644 --- a/app/controllers/api/v1/divisions_controller.rb +++ b/app/controllers/api/v1/divisions_controller.rb @@ -12,7 +12,7 @@ def index_with_address #seed_commons_id = Division.find_by(name: "Seed Commons").id seed_commons_division_ids = Division.find_by(name: "Seed Commons").self_and_descendants.pluck(:id) #divisions = Division.includes(address: [:country, :geo_state]).where(parent_id: seed_commons_id, public: true) - divisions = Division.includes(address: [:country, :geo_state]).where(parent_id: seed_commons_division_ids).where.not(address_id: nil).order(:name :asc) + divisions = Division.includes(address: [:country, :geo_state]).where(parent_id: seed_commons_division_ids).where.not(address_id: nil).order(name: :asc) render json: divisions.map { |division| format_division(division) } end