From 11e45bbc050be8637807775bd9e8d68b6260c3b1 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 7 Aug 2021 19:00:27 -0300 Subject: [PATCH] Solo crear el DeployLocal una vez --- app/views/deploys/_deploy_local.haml | 4 +++- test/controllers/sites_controller_test.rb | 7 +------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/views/deploys/_deploy_local.haml b/app/views/deploys/_deploy_local.haml index c60165fa..7409b47f 100644 --- a/app/views/deploys/_deploy_local.haml +++ b/app/views/deploys/_deploy_local.haml @@ -9,4 +9,6 @@ = sanitize_markdown t('.help', url: deploy.object.url), tags: %w[p strong em a] - = deploy.hidden_field :type + -# No duplicarlos una vez que existen. + - unless deploy.object.persisted? + = deploy.hidden_field :type diff --git a/test/controllers/sites_controller_test.rb b/test/controllers/sites_controller_test.rb index a7e2f68b..c9c98dff 100644 --- a/test/controllers/sites_controller_test.rb +++ b/test/controllers/sites_controller_test.rb @@ -119,12 +119,7 @@ class SitesControllerTest < ActionDispatch::IntegrationTest title: name, description: name * 2, design_id: design.id, - licencia_id: Licencia.all.second.id, - deploys_attributes: { - '0' => { - type: 'DeployLocal' - } - } + licencia_id: Licencia.all.second.id } }