mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 18:26:21 +00:00
fix: evitar métodos de publicación duplicados #12276
This commit is contained in:
parent
ad0d7aac10
commit
bee1653830
3 changed files with 1 additions and 5 deletions
|
@ -28,8 +28,6 @@ class SitesController < ApplicationController
|
||||||
|
|
||||||
@site = Site.new
|
@site = Site.new
|
||||||
authorize @site
|
authorize @site
|
||||||
|
|
||||||
@site.deploys.build type: 'DeployLocal'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -14,6 +14,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
|
||||||
self.site = Site.new params
|
self.site = Site.new params
|
||||||
|
|
||||||
add_role temporal: false, rol: 'usuarie'
|
add_role temporal: false, rol: 'usuarie'
|
||||||
|
site.deploys.build type: 'DeployLocal'
|
||||||
sync_nodes
|
sync_nodes
|
||||||
|
|
||||||
I18n.with_locale(usuarie.lang.to_sym || I18n.default_locale) do
|
I18n.with_locale(usuarie.lang.to_sym || I18n.default_locale) do
|
||||||
|
|
|
@ -158,9 +158,6 @@
|
||||||
= f.fields_for :deploys do |deploy|
|
= f.fields_for :deploys do |deploy|
|
||||||
= render "deploys/#{deploy.object.type.underscore}",
|
= render "deploys/#{deploy.object.type.underscore}",
|
||||||
deploy: deploy, site: site
|
deploy: deploy, site: site
|
||||||
- else
|
|
||||||
= f.fields_for :deploys do |deploy|
|
|
||||||
= deploy.hidden_field :type
|
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
= f.submit submit, class: 'btn btn-lg btn-block'
|
= f.submit submit, class: 'btn btn-lg btn-block'
|
||||||
|
|
Loading…
Reference in a new issue