mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 16:41:42 +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
|
||||
authorize @site
|
||||
|
||||
@site.deploys.build type: 'DeployLocal'
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue