Class: Decidim::CollaborativeTexts::Rollout

Inherits:
Decidim::Commands::CreateResource
  • Object
show all
Defined in:
app/commands/decidim/collaborative_texts/rollout.rb

Overview

This command is executed when the user creates a Document from the admin panel.

Instance Method Summary collapse

Instance Method Details

#run_after_hooksObject

1: add accepted suggestions authors as co-authors 2: transfer non-accepted suggestions to the new version



12
13
14
15
16
17
# File 'app/commands/decidim/collaborative_texts/rollout.rb', line 12

def run_after_hooks
  process_accepted_suggestions
  return if form.draft?

  move_pending_suggestions
end