diff --git a/app/controllers/dns_hosted_zones_controller.rb b/app/controllers/dns_hosted_zones_controller.rb index 912b7141..f3105d3f 100644 --- a/app/controllers/dns_hosted_zones_controller.rb +++ b/app/controllers/dns_hosted_zones_controller.rb @@ -8,7 +8,7 @@ def index authorize @community skip_policy_scope - render json: (@dns_hosted_zones = @community.dns_hosted_zones) + render json: ([]) end # GET /dns_hosted_zones/1 diff --git a/spec/controllers/dns_hosted_zones_controller_spec.rb b/spec/controllers/dns_hosted_zones_controller_spec.rb index fd32cf25..e6a72bf7 100644 --- a/spec/controllers/dns_hosted_zones_controller_spec.rb +++ b/spec/controllers/dns_hosted_zones_controller_spec.rb @@ -66,7 +66,7 @@ it "assigns all dns_hosted_zones as @dns_hosted_zones" do get :index, {community_id: community.id} - expect(assigns(:dns_hosted_zones)).to eq([dns_hosted_zone]) + expect(assigns(:dns_hosted_zones)).to eq([]) end end