app/commands/decidim/proposals/admin/create_proposal.rb in decidim-proposals-0.20.1 vs app/commands/decidim/proposals/admin/create_proposal.rb in decidim-proposals-0.21.0
- old
+ new
@@ -37,10 +37,11 @@
transaction do
create_proposal
create_attachment if process_attachments?
create_gallery if process_gallery?
+ link_author_meeeting if form.created_in_meeting?
send_notification
end
broadcast(:ok, proposal)
end
@@ -69,9 +70,13 @@
latitude: form.latitude,
longitude: form.longitude,
created_in_meeting: form.created_in_meeting,
published_at: Time.current
}
+ end
+
+ def link_author_meeeting
+ proposal.link_resources(form.author, "proposals_from_meeting")
end
def send_notification
Decidim::EventsManager.publish(
event: "decidim.events.proposals.proposal_published",