From 5b481c19cc47b258664e54ccc83fb29dee375e45 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 23 Mar 2020 14:53:13 +0100 Subject: [PATCH] Eager-load country in Producers controller --- app/controllers/producers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/producers_controller.rb b/app/controllers/producers_controller.rb index 0f45546fde..a5f4752c49 100644 --- a/app/controllers/producers_controller.rb +++ b/app/controllers/producers_controller.rb @@ -8,7 +8,7 @@ class ProducersController < BaseController .activated .visible .is_primary_producer - .includes(address: :state) + .includes(address: [:state, :country]) .includes(:properties) .includes(supplied_products: :properties) .all