mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 08:46:21 +00:00
fix: no todos los esquemas tienen borrador
This commit is contained in:
parent
51ba426a49
commit
bb4f92a475
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
|
||||||
def create
|
def create
|
||||||
self.post ||= site.posts(lang: locale).build(layout: layout)
|
self.post ||= site.posts(lang: locale).build(layout: layout)
|
||||||
post.usuaries << usuarie
|
post.usuaries << usuarie
|
||||||
post.draft.value = true if site.invitade? usuarie
|
post.draft.value = true if post.attribute?(:draft) && site.invitade?(usuarie)
|
||||||
post.assign_attributes(post_params)
|
post.assign_attributes(post_params)
|
||||||
|
|
||||||
params.require(base).permit(:slug).tap do |p|
|
params.require(base).permit(:slug).tap do |p|
|
||||||
|
|
Loading…
Reference in a new issue