5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-02 14:06:07 +00:00
This commit is contained in:
f 2019-09-12 15:10:37 -03:00
parent 53d7e74e31
commit 55a3978a40
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 9 additions and 2 deletions

View file

@ -41,6 +41,13 @@ class SitesController < ApplicationController
def edit
@site = find_site
# TODO: esto está acá para ayudar en la migración de
if @site.deploys.empty?
@site.deploys.build(type: 'DeployLocal')
@site.deploys.build type: 'DeployZip'
end
authorize @site
end
@ -51,7 +58,7 @@ class SitesController < ApplicationController
service = SiteService.new(site: @site, params: site_params,
usuarie: current_usuarie)
if service.update
if service.update.valid?
redirect_to sites_path
else
render 'edit'

View file

@ -81,7 +81,7 @@ class Site
# Hay commits sin aplicar?
def needs_pull?
commits.empty?
!commits.empty?
end
# Guarda los cambios en git, de a un archivo por vez