5
0
Fork 0
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:
f 2024-09-06 14:15:23 -03:00
commit b43e9d79ec
No known key found for this signature in database

View file

@ -27,8 +27,9 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
# @return Post # @return Post
def create def create
self.post ||= site.posts(lang: locale).build(layout: layout) self.post ||= site.posts(lang: locale).build(layout: layout)
params[base][:draft] = true if site.invitade? usuarie
post.usuaries << usuarie post.usuaries << 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|