Class: Decidim::Conferences::Admin::PublishConference
- Inherits:
-
Admin::ParticipatorySpace::Publish
- Object
- Decidim::Command
- Admin::ParticipatorySpace::Publish
- Decidim::Conferences::Admin::PublishConference
- Defined in:
- decidim-conferences/app/commands/decidim/conferences/admin/publish_conference.rb
Overview
A command that sets a Conference as published.
Instance Method Summary collapse
Methods inherited from Admin::ParticipatorySpace::Publish
Methods inherited from Decidim::Command
call, #evaluate, #method_missing, #respond_to_missing?, #transaction, #with_events
Constructor Details
This class inherits a constructor from Decidim::Admin::ParticipatorySpace::Publish
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Decidim::Command
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'decidim-conferences/app/commands/decidim/conferences/admin/publish_conference.rb', line 8 def call return broadcast(:invalid) if participatory_space.nil? || participatory_space.published? Decidim.traceability.perform_action!(:publish, participatory_space, user, **) do participatory_space.publish! end send_notification broadcast(:ok, participatory_space) end |