mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 22:56:21 +00:00
empezar un sitio con deploy local nada más
This commit is contained in:
parent
e6a589a9b1
commit
1695cc6771
3 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,8 @@ class SitesController < ApplicationController
|
||||||
def new
|
def new
|
||||||
@site = Site.new
|
@site = Site.new
|
||||||
authorize @site
|
authorize @site
|
||||||
SiteService.new(site: @site).build_deploys
|
|
||||||
|
@site.deploys.build type: 'DeployLocal'
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -35,6 +35,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
|
||||||
site
|
site
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Genera los Deploy necesarios para el sitio a menos que ya los tenga.
|
||||||
def build_deploys
|
def build_deploys
|
||||||
Site::DEPLOYS.map { |deploy| "Deploy#{deploy.to_s.camelcase}" }
|
Site::DEPLOYS.map { |deploy| "Deploy#{deploy.to_s.camelcase}" }
|
||||||
.each do |deploy|
|
.each do |deploy|
|
||||||
|
|
|
@ -138,8 +138,6 @@
|
||||||
deploy: deploy, site: site
|
deploy: deploy, site: site
|
||||||
- else
|
- else
|
||||||
= f.fields_for :deploys do |deploy|
|
= f.fields_for :deploys do |deploy|
|
||||||
- next unless deploy.object.is_a? DeployLocal
|
|
||||||
|
|
||||||
= deploy.hidden_field :type
|
= deploy.hidden_field :type
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
|
|
Loading…
Reference in a new issue