mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-24 14:01:50 +00:00
Merge branch 'issue-15066' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
e37fe084f9
3 changed files with 5 additions and 2 deletions
|
@ -49,6 +49,8 @@ class MetadataFile < MetadataTemplate
|
|||
value['path'] = relative_destination_path_with_filename.to_s if static_file
|
||||
end
|
||||
|
||||
self[:value] = self[:value].to_h
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ class Post
|
|||
# Limpiar el nombre del atributo, para que todos los ayudantes
|
||||
# reciban el método en limpio
|
||||
unless attribute? name
|
||||
raise UnknownAttributeError, I18n.t('exceptions.post.no_method', method: name)
|
||||
raise NoMethodError, I18n.t('exceptions.post.no_method', method: name)
|
||||
end
|
||||
|
||||
define_singleton_method(name) do
|
||||
|
|
|
@ -19,9 +19,10 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
|
|||
|
||||
# Crea los posts anidados
|
||||
create_nested_posts! post, params[:post]
|
||||
post.save
|
||||
update_related_posts
|
||||
|
||||
commit(action: :created, add: files) if post.save
|
||||
commit(action: :created, add: files)
|
||||
|
||||
update_site_license!
|
||||
|
||||
|
|
Loading…
Reference in a new issue