app/commands/decidim/assemblies/admin/update_assembly.rb in decidim-assemblies-0.22.0 vs app/commands/decidim/assemblies/admin/update_assembly.rb in decidim-assemblies-0.23.0
- old
+ new
@@ -60,14 +60,10 @@
{
title: form.title,
subtitle: form.subtitle,
slug: form.slug,
hashtag: form.hashtag,
- hero_image: form.hero_image,
- remove_hero_image: form.remove_hero_image,
- banner_image: form.banner_image,
- remove_banner_image: form.remove_banner_image,
promoted: form.promoted,
description: form.description,
short_description: form.short_description,
scopes_enabled: form.scopes_enabled,
scope: form.scope,
@@ -97,10 +93,19 @@
twitter_handler: form.twitter_handler,
facebook_handler: form.facebook_handler,
instagram_handler: form.instagram_handler,
youtube_handler: form.youtube_handler,
github_handler: form.github_handler
- }
+ }.merge(uploader_attributes)
+ end
+
+ def uploader_attributes
+ {
+ hero_image: form.hero_image,
+ remove_hero_image: form.remove_hero_image,
+ banner_image: form.banner_image,
+ remove_banner_image: form.remove_banner_image
+ }.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) }
end
def participatory_processes(assembly)
@participatory_processes ||= assembly.participatory_space_sibling_scope(:participatory_processes).where(id: @form.participatory_processes_ids)
end