5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 08:14:17 +00:00

fix: evitar métodos de publicación duplicados #12276

This commit is contained in:
f 2023-03-30 14:45:49 -03:00
parent ad0d7aac10
commit bee1653830
3 changed files with 1 additions and 5 deletions

View file

@ -28,8 +28,6 @@ class SitesController < ApplicationController
@site = Site.new
authorize @site
@site.deploys.build type: 'DeployLocal'
end
def create

View file

@ -14,6 +14,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
self.site = Site.new params
add_role temporal: false, rol: 'usuarie'
site.deploys.build type: 'DeployLocal'
sync_nodes
I18n.with_locale(usuarie.lang.to_sym || I18n.default_locale) do

View file

@ -158,9 +158,6 @@
= f.fields_for :deploys do |deploy|
= render "deploys/#{deploy.object.type.underscore}",
deploy: deploy, site: site
- else
= f.fields_for :deploys do |deploy|
= deploy.hidden_field :type
.form-group
= f.submit submit, class: 'btn btn-lg btn-block'