mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-29 03:46:22 +00:00
Merge branch 'issue-17343' into production.panel.sutty.nl
This commit is contained in:
commit
b43e9d79ec
1 changed files with 2 additions and 1 deletions
|
@ -27,8 +27,9 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
|
|||
# @return Post
|
||||
def create
|
||||
self.post ||= site.posts(lang: locale).build(layout: layout)
|
||||
params[base][:draft] = true if site.invitade? usuarie
|
||||
|
||||
post.usuaries << usuarie
|
||||
post.draft.value = true if post.attribute?(:draft) && site.invitade?(usuarie)
|
||||
post.assign_attributes(post_params)
|
||||
|
||||
params.require(base).permit(:slug).tap do |p|
|
||||
|
|
Loading…
Reference in a new issue